Image encoding / decoding method and apparatus using a sequence parameter set including information on the maximum number of merging candidates, and method of transmitting a bitstream
By encoding the maximum number of merge candidates in image encoding/decoding using a sequence parameter set, the problem of low image encoding/decoding efficiency in the prior art is solved, and more efficient image transmission and storage are achieved.
Patent Information
- Application Number
- CN202180019552.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2020-01-12
- Filing Date
- 2021-01-12
- Publication Date
- 2025-05-09
- Estimated Expiration
- 2041-01-12
AI Technical Summary
The prior art is difficult to effectively improve the efficiency of image encoding/decoding, especially when processing high-resolution and high-quality images, resulting in increased transmission and storage costs.
The maximum number of merge candidates is encoded/decoded by the sequence parameter set, a merge candidate list of the current block is constructed, and motion information is derived and prediction blocks are generated based on this.
Improve image encoding/decoding efficiency, reduce the amount of bits transmitted and stored, and enhance signaling efficiency and ease of tool control.
Smart Images

Figure CN115244928B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to an image encoding / decoding method and device, and more particularly, to an image encoding / decoding method and device for encoding / decoding information about a maximum number of merge candidates included in a merge candidate list through a sequence parameter set, and a method for transmitting a bit stream generated by the image encoding method / device 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 information on a maximum number of merging candidates through a sequence parameter set.
[0007] 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.
[0008] 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.
[0009] 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.
[0010] 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.
[0011] Technical Solution
[0012] According to an aspect of the present disclosure, an image decoding method may include: constructing a merge candidate list of the current block based on a prediction mode of the current block; deriving motion information of the current block based on the merge candidate list; and generating a prediction block of the current block based on the motion information. Information about the maximum number of merge candidates included in the merge candidate list may be obtained through a sequence parameter set, and based on whether the prediction mode is a sub-block based merge mode, the maximum number of merge candidates may be determined based on whether an affine mode is available for the current block.
[0013] 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 be configured to: construct a merge candidate list of the current block based on the prediction mode of the current block; derive motion information of the current block based on the merge candidate list; and generate a prediction block of the current block based on the motion information. Information about the maximum number of merge candidates included in the merge candidate list may be obtained through a sequence parameter set, and based on whether the prediction mode is a sub-block based merge mode, the maximum number of merge candidates may be determined based on whether an affine mode is available for the current block.
[0014] According to another aspect of the present disclosure, an image encoding method may include: constructing a merge candidate list of a current block based on a prediction mode of the current block; deriving motion information of the current block based on the merge candidate list; and encoding the motion information and information about the maximum number of merge candidates included in the merge candidate list. The information about the maximum number of merge candidates included in the merge candidate list may be encoded by a sequence parameter set, and based on whether the prediction mode is a sub-block based merge mode, the maximum number of merge candidates may be determined based on whether an affine mode is available for the current block.
[0015] 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.
[0016] The features described above in brief summary of the present disclosure are merely exemplary aspects of the following detailed description of the present disclosure and do not limit the scope of the present disclosure.
[0017] Beneficial Effects
[0018] According to the present disclosure, it is possible to provide an image encoding / decoding method and apparatus with improved encoding / decoding efficiency.
[0019] Furthermore, according to the present disclosure, it is possible to provide an image encoding / decoding method and apparatus using a sequence parameter set including information on the maximum number of merging candidates.
[0020] In addition, according to the present disclosure, it is possible to provide an image encoding / decoding method and apparatus with improved signaling efficiency in an inter-prediction mode based on a merge candidate list.
[0021] Furthermore, according to the present disclosure, it is possible to provide an image encoding / decoding method and apparatus with easy tool control in an inter prediction mode based on a merge candidate list.
[0022] 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.
[0023] 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.
[0024] 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.
[0025] 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
[0026] Figure 1 FIG. 4 is a diagram schematically illustrating a video encoding system to which an embodiment of the present disclosure is applicable.
[0027] Figure 2 is a view schematically illustrating an image encoding device to which an embodiment of the present disclosure is applicable.
[0028] Figure 3 is a view schematically illustrating an image decoding device to which an embodiment of the present disclosure is applicable.
[0029] Figure 4 is a flowchart illustrating a video / image encoding method based on inter-frame prediction.
[0030] Figure 5 is a view illustrating a configuration of the inter prediction unit 180 according to the present disclosure.
[0031] Figure 6 is a flowchart illustrating a video / image decoding method based on inter-frame prediction.
[0032] Figure 7 is a view illustrating a configuration of the inter prediction unit 260 according to the present disclosure.
[0033] Figure 8 is a view illustrating neighboring blocks that can be used as spatial merging candidates.
[0034] Fig. 9 is a view schematically illustrating a method for constructing a merge candidate list according to an example of the present disclosure.
[0035] Fig.10 is a view schematically illustrating a motion vector predictor candidate list configuration method according to an example of the present disclosure.
[0036] Fig.11 is a view illustrating a parametric model of an affine pattern.
[0037] Fig.12 is a view illustrating a method of generating an affine merge candidate list.
[0038] Fig.13 is a view of neighboring blocks illustrating a sub-block based TMVP mode.
[0039] Fig.14 is a view illustrating a method of deriving a motion vector field according to a sub-block based TMVP mode.
[0040] Fig.15 is a view illustrating an example of splitting a current block into two triangular partitions by applying TPM.
[0041] Fig.16 is a view illustrating an example of a picture parameter set (PPS) including information about the maximum number of merge candidates.
[0042] Fig.17 is a view illustrating an example of a picture header including information about the maximum number of merging candidates.
[0043] Fig.18 is a view illustrating an example of a picture parameter set (PPS) according to an embodiment of the present disclosure.
[0044] Fig.19 is a view illustrating an example of a sequence parameter set (SPS) according to an embodiment of the present disclosure.
[0045] Fig. 20 is a view illustrating an example of a slice header according to an embodiment of the present disclosure.
[0046] Fig.21 is a view illustrating an example of a picture header according to an embodiment of the present disclosure.
[0047] Fig. 22 is a flowchart illustrating an image encoding method according to an embodiment of the present disclosure.
[0048] Fig.23 is a flowchart illustrating an image decoding method according to an embodiment of the present disclosure.
[0049] Fig.24 is a diagram showing a content streaming system to which an embodiment of the present disclosure is applicable. DETAILED DESCRIPTION
[0050] 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.
[0051] 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.
[0052] 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.
[0053] 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.
[0054] 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.
[0055] 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.
[0056] 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.
[0057] 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).
[0058] 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.
[0059] 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.
[0060] 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".
[0061] In addition, in the present disclosure, unless explicitly stated as a chroma block, a "current block" may mean a block including both a luma component block and a chroma component block or a "luma block of the current block". The luma component block of the current block may be represented by an explicit description including a luma component block such as "luma block" or "current luma block". In addition, a "chroma component block of the current block" may be explicitly represented by an explicit description including a chroma component block such as "chroma block" or "current chroma block".
[0062] 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".
[0063] 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".
[0064] Overview of Video Coding Systems
[0065] Figure 1 is a diagram schematically illustrating a video encoding system according to the present disclosure.
[0066] 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.
[0067] 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.
[0068] 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.
[0069] 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.
[0070] 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.
[0071] 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.
[0072] The renderer 23 may render the decoded video / image. The rendered video / image may be displayed through a display.
[0073] Overview of Image Coding Equipment
[0074] Figure 2 is a view schematically showing an image encoding device to which an embodiment of the present disclosure is applicable.
[0075] 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.
[0076] 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.
[0077] 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.
[0078] 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.
[0079] 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.
[0080] 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.
[0081] The prediction unit may generate a prediction signal based on various prediction methods and prediction techniques described below. For example, the prediction unit may not only apply intra prediction or inter prediction, but may also apply intra prediction and inter prediction simultaneously to predict the current block. The prediction method of applying both intra prediction and inter prediction simultaneously to predict the current block may be referred to as combined inter and intra prediction (CIIP). In addition, the prediction unit may perform intra block copying (IBC) to predict the current block. Intra block copying may be used for content image / video encoding of games, etc., such as 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 may be encoded as a vector (block vector) corresponding to a predetermined distance. IBC basically performs prediction in the current picture, but may be performed similarly to inter prediction because the reference block is derived within the current picture. That is, IBC may use at least one inter prediction technique described in the present disclosure.
[0082] 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.
[0083] 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.
[0084] 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.
[0085] 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.
[0086] 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.
[0087] 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.
[0088] 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.
[0089] 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.
[0090] 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.
[0091] 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.
[0092] Overview of Image Decoding Equipment
[0093] Figure 3 is a view schematically showing an image decoding device to which an embodiment of the present disclosure is applicable.
[0094] 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.
[0095] 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.
[0096] 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).
[0097] 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 .
[0098] 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, at least one of an inter-frame prediction unit 160 or an intra-frame prediction unit 265.
[0099] 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.
[0100] The inverse transformer 230 may inversely transform the transform coefficients to obtain a residual signal (residual block, residual sample array).
[0101] 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).
[0102] 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.
[0103] 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.
[0104] 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.
[0105] The adder 235 can generate a reconstruction 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-prediction unit 265). If the block to be processed has no residual (for example, when the skip mode is applied), the prediction block can be used as a reconstructed block. The description of the adder 155 also applies to the adder 235. The adder 235 can be called a reconstructor or a reconstructed block generator. The generated reconstruction 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.
[0106] 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.
[0107] 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.
[0108] 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.
[0109] Overview of Inter Prediction
[0110] 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, a prediction block of the current block may be derived based on a reference block specified by a motion vector on a reference picture.
[0111] 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.
[0112] 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).
[0113] 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.
[0114] 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.
[0115] 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
[0116] L0 may also include a picture following the current picture in output order as a reference picture.
[0117] 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 a picture before the current picture in the output order as a reference picture. 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.
[0118] Figure 4 is a flowchart illustrating a video / image encoding method based on inter-frame prediction.
[0119] Figure 5 is a view illustrating a configuration of the inter predictor 180 according to the present disclosure.
[0120] Figure 6 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 S630 may be derived by the inter-frame predictor 180, and the residual information of step S630 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.
[0121] 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 5As 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.
[0122] 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).
[0123] 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.
[0124] 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.
[0125] 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.
[0126] 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.
[0127] 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.
[0128] 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.
[0129] Figure 6 is a flowchart illustrating a video / image decoding method based on inter-frame prediction.
[0130] Figure 7 is a view illustrating a configuration of the inter prediction unit 260 according to the present disclosure.
[0131] 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.
[0132] 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.
[0133] 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.
[0134] 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.
[0135] 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.
[0136] 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.
[0137] 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.
[0138] 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.
[0139] 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.
[0140] 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.
[0141] Hereinafter, the steps of deriving motion information according to the prediction mode will be described in more detail.
[0142] 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.
[0143] 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.
[0144] 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.
[0145] The present disclosure provides various implementations for configuring a merge candidate block of a merge candidate list. 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.
[0146] Figure 8 is a view illustrating neighboring blocks that can be used as spatial merging candidates.
[0147] Fig. 9 is a view schematically illustrating a method for constructing a merge candidate list according to an example of the present disclosure.
[0148] The image encoding / decoding apparatus may insert a spatial merge candidate derived by searching for spatial neighboring blocks of the current block into a merge candidate list (S910). Figure 8As shown, the spatial neighboring blocks may include a lower left neighboring block A0, a left neighboring block A1, an upper right neighboring block B0, an upper neighboring block B1, and an upper left neighboring block B2 of the current block. However, this is an example, and in addition to the above-mentioned spatial neighboring blocks, additional neighboring blocks such as a right neighboring block, a lower neighboring block, and a lower right neighboring block may be further used as spatial neighboring blocks. The image encoding / decoding device may detect available blocks by searching the spatial neighboring blocks based on priority, and derive motion information of the detected blocks as spatial merging candidates. For example, the image encoding / decoding device may detect available blocks by searching in the order of A1, B1, B0, A0, and B2. Figure 8 The five blocks shown are indexed in turn to build a merge candidate list.
[0149] The image encoding / decoding device may insert a temporal merge candidate derived by searching for temporal neighboring blocks of the current block into a merge candidate list (S920). The temporal neighboring block may be located on a reference picture different from the current picture in which the current block is located. The reference picture in which the temporal neighboring block is located may be referred to as a collocated picture or a col picture. The temporal neighboring blocks may be searched in the order of the lower right corner neighboring block and the lower right center block of the collocated block of the current block on the col picture. In addition, when motion data compression is applied in order to reduce memory load, specific motion information may be stored as representative motion information of each predetermined storage unit of the col picture. In this case, it is not necessary to store motion information of all blocks in the predetermined storage unit, thereby obtaining a motion data compression effect. In this case, the predetermined storage unit may be predetermined to be, for example, a 16×16 sample unit or an 8×8 sample unit, or the size information of the predetermined storage unit may be signaled from the image encoding device to the image decoding device. When motion data compression is applied, the motion information of the temporal neighboring block may be replaced with the representative motion information of the predetermined storage unit in which the temporal neighboring block is located. That is, in this case, from the perspective of implementation, the temporal merging candidate can be derived based on the motion information of the prediction block covering the arithmetically left shifted position after the coordinates (upper left sample position) of the temporal neighboring block are arithmetically right shifted by a predetermined value (rather than the prediction block located on the coordinates of the temporal neighboring block). For example, when the predetermined storage unit is 2 n ×2 nWhen the coordinates of the sample unit and the temporally neighboring block are (xTnb, yTnb), the motion information of the prediction block located at the modified position ((xTnb >> n) << n), (yTnb >> n) << n)) can be used for temporal merge candidates. Specifically, for example, when the predetermined storage unit is a 16×16 sample unit and the coordinates of the temporally neighboring block are (xTnb, yTnb), the motion information of the prediction block located at the modified position ((xTnb >> 4) << 4), (yTnb >> 4) << 4)) can be used for temporal merge candidates. Alternatively, for example, when the predetermined storage unit is an 8×8 sample unit and the coordinates of the temporally neighboring block are (xTnb, yTnb), the motion information of the prediction block located at the modified position ((xTnb >> 3) << 3), (yTnb >> 3) << 3)) can be used for temporal merge candidates.
[0150] Referring again to Fig. 9 , the image encoding / decoding device may check whether the current number of merge candidates is less than the maximum number of merge candidates (S930). The maximum number of merge candidates may be predefined or signaled from the image encoding device to the image decoding device. For example, the image encoding device may generate and encode information about the maximum number of merge candidates and send the encoded information to the image decoding device in the form of a bitstream. When the maximum number of merge candidates is satisfied, the subsequent candidate addition process S940 may not be performed.
[0151] When, as a result of the check in step S930, the current number of merge candidates is less than the maximum number of merge candidates, the image encoding / decoding device may derive additional merge candidates according to a predetermined method and then insert the additional merge candidates into the merge candidate list (S940). For example, the additional merge candidates may include at least one of a history-based merge candidate, a pairwise average merge candidate, an ATMVP, a combined bi-prediction merge candidate (when the slice / tile group type of the current slice / tile group is of type B), and / or a zero vector merge candidate.
[0152] When, as a result of the check in step S930, the current number of merge candidates is not less than the maximum number of merge candidates, the image encoding / decoding device may end the construction of the merge candidate list. In this case, the image encoding device may select an optimal merge candidate from among the merge candidates configuring the merge candidate list and signal candidate selection information (e.g., a merge candidate index or a merge index) indicating the selected merge candidate to the image decoding device. The image decoding device may select an optimal merge candidate based on the merge candidate list and the candidate selection information.
[0153] As described above, the motion information of the selected merge candidate may be used as the motion information of the current block, and the prediction sample of the current block may be derived based on the motion information of the current block. The image encoding device may derive the residual sample of the current block based on the prediction sample, and signal the residual information of the residual sample to the image decoding device. As described above, the image decoding device may generate a reconstructed sample based on the residual sample derived from the residual information and the prediction sample, and generate a reconstructed picture based thereon.
[0154] When the skip mode is applied to the current block, the motion information of the current block can be derived using the same method as the case where the merge mode is applied. However, when the skip mode is applied, the residual signal of the corresponding block is omitted, and thus the prediction sample can be directly used as the reconstructed sample. For example, when the value of cu_skip_flag is 1, the above skip mode can be applied.
[0155] When the MVP mode is applied to the current block, the reconstructed spatial neighboring blocks (e.g., Figure 8 The motion vector predictor (MVP) candidate list is generated based on the motion vector of the reconstructed spatial neighboring block (neighboring block shown) and / or the motion vector corresponding to the temporal neighboring block (or Col block). That is, the motion vector of the reconstructed spatial neighboring block and the motion vector corresponding to the temporal neighboring block can be used as the motion vector predictor candidate of the current block. When bidirectional prediction is applied, the MVP candidate list for L0 motion information derivation and the MVP candidate list for L1 motion information derivation are generated and used separately. The prediction information (or information about the prediction) of the current block may include candidate selection information (e.g., MVP flag or MVP index) indicating the best motion vector predictor candidate selected from the motion vector predictor candidates included in the MVP candidate list. In this case, the prediction unit can use the candidate selection information to select the motion vector predictor of the current block from the motion vector predictor candidates included in the MVP candidate list. The prediction unit of the image encoding device can obtain and encode the motion vector difference (MVD) between the motion vector of the current block and the motion vector predictor and output the encoded MVD in the form of a bitstream. That is, the MVD can be obtained by subtracting the motion vector predictor from the motion vector of the current block. The prediction unit of the image decoding device may obtain the motion vector difference included in the information about the prediction and derive the motion vector of the current block by adding the motion vector difference to the motion vector predictor. The prediction unit of the image decoding device may obtain or derive the reference picture index indicating the reference picture from the information about the prediction.
[0156] Fig.10 is a view schematically illustrating a method for constructing a motion vector predictor candidate list according to an example of the present disclosure.
[0157] First, the spatial candidate blocks of the current block can be searched and the available candidate blocks can be inserted into the MVP candidate list (S1010). Thereafter, it is determined whether the number of MVP candidates included in the MVP candidate list is less than 2 (S1020), and when the number of MVP candidates is 2, the construction of the MVP candidate list can be completed.
[0158] In step S1020, when the number of available spatial candidate blocks is less than 2, the temporal candidate blocks of the current block may be searched and the available candidate blocks may be inserted into the MVP candidate list (S1030). When the temporal candidate blocks are not available, a zero motion vector may be inserted into the MVP candidate list (S1040), thereby completing the construction of the MVP candidate list.
[0159] In addition, when the MVP mode is applied, the reference picture index may be explicitly signaled. In this case, the reference picture index refidxL0 for L0 prediction and the reference picture index refidxL1 for L1 prediction may be signaled differently. For example, when the MVP mode is applied and dual prediction is applied, information about refidxL0 and information about refidxL1 may be signaled.
[0160] As described above, when the MVP mode is applied, information about the MVP derived by the image encoding device may be signaled to the image decoding device. For example, the information about the MVD may include the MVD absolute value and information indicating the x and y components for the sign. In this case, when the MVD absolute value is greater than 0, whether the MVD absolute value is greater than 1 and information indicating the MVD remainder may be signaled step by step. For example, only when the value of the flag information indicating whether the MVD absolute value is greater than 0 is 1, the information indicating whether the MVD absolute value is greater than 1 may be signaled.
[0161] Overview of Affine Mode
[0162] 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 a current block. However, in this method, there is a problem that 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 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.
[0163] Compared with the existing motion information expressed using translational motion (or displacement) of pixel values, in the affine mode, the motion information of each pixel can be expressed using at least one of translational motion, scaling, rotation, or shearing. Among them, the affine mode that uses displacement, scaling, or rotation to express the motion information of each pixel can be a similar or simplified affine mode. The affine mode in the following description can mean a similar or simplified affine mode.
[0164] 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).
[0165] Fig.11 is a view illustrating a parametric model of an affine pattern.
[0166] 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.11 (a) and Fig.11 (b) shows the CPMV used in the 4-parameter model and the 6-parameter model respectively.
[0167] 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.
[0168] [Formula 1]
[0169]
[0170] [Formula 2]
[0171]
[0172] In Equations 1 and 2, mv0={mv_0x, mv_0y} may be the CPMV at the upper left corner position of the current block, v1={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}.
[0173] 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 of determining the affine MVF in units of 4×4 sub-blocks will be described. However, this is only for the convenience of description, and the size of the sub-block may be changed differently.
[0174] 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.
[0175] 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.
[0176] In addition, the affine merge that derives MV in units of sub-blocks can be referred to as a sub-block based merge mode, which can be specified by merge_subblock_flag having a second value (e.g., 1). In this case, the affine merge candidate list described below can be referred to as a sub-block merge candidate list. In this case, the candidate derived as the sbTMVP described below can be further included in the sub-block merge candidate list. In this case, the candidate derived as the sbTMVP can be used as a candidate for index #0 of the sub-block merge candidate list. In other words, the candidate derived as the sbTMVP can be located in front of the inherited affine candidate and the constructed affine candidate described below in the sub-block merge candidate list.
[0177] 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.
[0178] 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.
[0179] Fig.12 is a view illustrating a method of generating an affine merge candidate list.
[0180] Reference Fig.12 , 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.
[0181] Sub-block based TMVP (sbTMVP ) mode overview
[0182] 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.
[0183] 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 can be encoded / decoded in units of sub-coding units. In addition, according to the conventional TMVP mode, temporal motion vectors can be derived from collocated blocks, but in the sub-block based TMVP mode, motion vector fields can be derived from reference blocks 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.
[0184] Fig.13 is a view of neighboring blocks illustrating a sub-block based TMVP mode.
[0185] 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.13 The 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).
[0186] Fig.14 is a view illustrating a method of deriving a motion vector field according to a sub-block based TMVP mode.
[0187] 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.14In 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.
[0188] 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.
[0189] Hereinafter, a merge candidate list configured in sub-block units is defined as a sub-block merge candidate list. The above-mentioned affine merge candidate and sub-block-based TMVP candidate may be merged to configure a sub-block merge candidate list.
[0190] 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 (e.g., sequence, picture, slice, patch, patch group, tile, etc.) of the current block. 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 merge candidate list, and then the affine merge candidate may be added to the sub-block merge candidate list. In addition, the maximum number of candidates that may be included in the sub-block merge candidate list may be signaled. For example, the maximum number of candidates that may be included in the sub-block merge candidate list may be 5.
[0191] The size of the sub-block used to derive the sub-block merge candidate list may be signaled or preset to M×N. For example, M×N may be 8×8. Therefore, the affine mode or sub-block-based TMVP mode is applicable to the current block only when the size of the current block is 8×8 or larger.
[0192] Triangular partitioning for inter-frame prediction ( TPM )
[0193] As an inter prediction mode, triangular partitioning for inter prediction (TPM; triangular partitioning mode) may be used. TPM may be applied to a CU of size 8x8 or larger. Information specifying whether TPM is used for the current CU may be signaled as flag information, for example, at the CU level. TPM may be considered as one mode included in the general merge mode together with the normal merge mode, the MMVD mode, the CIIP mode, and the sub-block-based merge mode.
[0194] Fig.15 is a view illustrating an example of splitting a current block into two triangular partitions by applying TPM.
[0195] like Fig.15 As shown in FIG. 1 , when TPM is applied, the current block (CU) can be divided into two triangular partitions diagonally or anti-diagonally. Each triangular partition is inter-predicted using each motion, and only uni-prediction is allowed for each partition. That is, each triangular partition can have one motion vector and one reference picture index. The reason why only uni-prediction is allowed for each partition is because each CU requires two motion compensation prediction blocks as in normal bi-prediction.
[0196] The motion information for single prediction of TPM can be obtained from the reference Fig. 9 For example, for a single prediction of TPM, we can derive the merge candidate list from Fig. 9 The uni-prediction candidate list is derived from the merge candidate list of the triangular partition. When the variable n is the index of the uni-prediction motion candidate included in the uni-prediction candidate list of the triangular partition, the LX motion vector (x equals the parity of n) of the n-th merge candidate can be used as the n-th uni-prediction motion vector of the TPM. Fig.15 The nth uni-prediction motion vector of TPM in is represented by “x”. In this case, when there is no LX motion vector of the nth merge candidate, the L(1-X) motion vector of the nth merge mode may be used as the uni-prediction motion vector of TPM instead of the LX motion vector.
[0197] When TPM is used for the current block, a flag specifying the triangular partition direction (diagonal or anti-diagonal) and two merge indexes (one index for each partition) can be signaled. The maximum number of TPM merge candidates can be explicitly signaled at the slice level. In addition, the syntax binarization method of the TPM merge index can be specified according to the maximum number of TPM merge candidates. After performing prediction on each partition, the predicted sample value can be adjusted along the diagonal or anti-diagonal line. The adjustment of the predicted sample value can be performed by hybrid processing using adaptive weights. The prediction signal generated by TPM is for the entire CU (current block), and the transformation and quantization of the residual signal can be performed on the entire CU as in other prediction modes. Finally, the motion field of the CU predicted in TPM can be stored in units of 4x4 samples. TPM is not performed with sub-block transform (SBT). That is, when the flag specifying TPM has a first value (e.g., 1), the flag (e.g., cu_sbt_flag) specifying whether to perform the transform in units of sub-blocks can be inferred as a second value without signaling.
[0198] After performing prediction on each triangular partition, a blending process may be performed. The blending process may be applied to the two prediction signals to derive samples around diagonal edges or anti-diagonal edges.
[0199] Intra-block copy ( IBC ) Overview of Forecast
[0200] Hereinafter, IBC prediction according to the present disclosure will be described.
[0201] IBC prediction can be performed by a prediction unit of an image encoding / decoding device. IBC prediction can be referred to as IBC for short. IBC can be used for content image / motion image encoding such as screen content coding (SCC). IBC prediction can basically perform IBC prediction in the current picture, but can be performed similarly to inter-frame prediction because the reference block is derived within the current picture. That is, IBC can use at least one of the inter-frame prediction techniques described in the present disclosure. For example, IBC can use at least one of the above-mentioned motion information (motion vector) derivation methods. It can be considered that IBC prediction partially modifies and uses at least one of the inter-frame prediction techniques. IBC can refer to the current picture and can therefore be called a current picture reference (CPR).
[0202] For IBC, the image encoding device may perform block matching (BM) and derive the optimal block vector (or motion vector) of the current block (or current CU). The derived block vector may be signaled to the image decoding device through the bitstream using a method similar to the signaling of the motion information (motion vector) in the above-mentioned inter-frame prediction. The image decoding device may derive the reference block of the current block in the current picture by the block vector signaled, and derive the prediction signal (prediction block or prediction sample) of the current block by this. Here, the block vector may specify the displacement from the current block to the reference block located in the reconstructed area in the current picture. Therefore, the block vector (or motion vector) may be referred to as a displacement vector. Hereinafter, in IBC, the motion vector may correspond to a block vector or a displacement vector. The motion vector of the current block may include a motion vector of a luminance component (luminance motion vector) or a motion vector of a chrominance component (chrominance motion vector). For example, the luminance motion vector of an IBC-encoded CU may be an integer sample unit (ie, integer precision). The chrominance motion vector may be cropped by integer sample units. As described above, IBC may use at least one inter-frame prediction technique, for example, the luma motion vector may be encoded / decoded using the above-described merge mode or MVP mode.
[0203] When the merge mode is applied to the luma IBC block, the merge candidate list of the luma IBC block may be constructed similarly to the merge candidate list in the inter prediction mode. However, unlike the merge candidate list in the inter prediction mode, the merge candidate list of the luma IBC block may not include a temporal candidate block.
[0204] When the MVP mode is applied to the luma IBC block, the mvp candidate list of the luma IBC block can be constructed similarly to the mvp candidate list in the inter prediction mode. However, unlike the mvp candidate list in the inter prediction mode, the merge candidate list of the luma IBC block may not include a temporal candidate block.
[0205] In IBC, the reference block is derived from an already reconstructed area in the current picture. In this case, in order to reduce the memory consumption and complexity of the image decoding device, a predefined area among the already reconstructed areas in the current picture can be referenced. The predefined area can include the current CTU in which the current block is included. In this way, by limiting the referenceable reconstruction area to the predefined area, the IBC mode can be implemented in hardware using local on-chip memory.
[0206] An image encoding apparatus for performing IBC may search a predefined area to determine a reference block having a minimum RD cost and derive a motion vector (block vector) based on the positions of the reference block and the current block.
[0207] The prediction mode information of IBC may be signaled at the CU level. For example, flag information specifying whether the IBC skip / merge mode is applied to the current block and / or flag information specifying whether the IBC AMVP mode is applied to the current block may be signaled through the coding_unit syntax.
[0208] In the case of IBC skip / merge mode, a merge candidate index may be signaled to specify a block vector to be used for prediction of the current luma block among the block vectors included in the merge candidate list. In this case, the merge candidate list may include IBC-encoded neighboring blocks. As described above, the merge candidate list may include spatial merge candidates, but may not include temporal merge candidates. In addition, the merge candidate list may also include history-based motion vector predictor (HMVP) candidates and / or paired candidates.
[0209] In the case of the IBC MVP mode, the block vector difference can be encoded using the same method as the motion vector difference of the above-mentioned inter-frame prediction mode. In the IBC MVP mode, the block vector prediction method can be performed similarly to the MVP mode based on the MVP candidate list including two candidates as predictors. One of the two candidates can be derived from the left neighboring block of the current block, and the other candidate can be derived from the top neighboring block of the current block. In this case, the candidate can only be derived from the corresponding neighboring block when the left neighboring block or the top neighboring block is IBC encoded. If the left neighboring block or the top neighboring block is not available (for example, not IBC encoded), a predetermined default block vector can be included in the MVP candidate list as a predictor. In addition, in the case of the IBC MVP mode, block vector prediction similar to the MVP mode can be performed, so that information (for example, a flag) specifying one of the two block vector predictors is notified as candidate selection information and used for image decoding. The MVP candidate list may include an HMVP candidate and / or a zero motion vector as a default block vector.
[0210] The HMVP candidate may be referred to as a history-based MVP candidate, and an MVP candidate, a merge candidate, or a block vector candidate used before encoding / decoding of the current block may be stored in the HMVP list as an HMVP candidate. Thereafter, when the merge candidate list or the mvp candidate list of the current block does not include the maximum number of candidates, the candidate stored in the HMVP list may be added as an HMVP candidate to the merge candidate list or the mvp candidate list of the current block.
[0211] The pair of candidates may mean candidates derived by averaging two candidates selected according to a predetermined order from among candidates included in the merge candidate list of the current block.
[0212] Prediction mode information (e.g., pred_mode_ibc_flag) specifying whether IBC is applied to the current block may be signaled at the CU level. For example, pred_mode_ibc_flag may be signaled through a coding_unit syntax. In this case, pred_mode_ibc_flag having a first value (e.g., 0) may specify that IBC is not applied to the current block. Conversely, pred_mode_ibc_flag having a second value (e.g., 1) may specify that IBC is applied to the current block.
[0213] As described above, when the inter prediction mode is applied to the current block, the prediction block of the current block may be generated based on a predetermined merge candidate list. The inter prediction mode of the current block may be determined as any one of various inter prediction modes (e.g., a normal merge mode, an affine mode, a sub-block-based merge mode, a triangular partitioning (TPM) for inter prediction, an intra block copy (IBC), etc.). In addition, information about the maximum number of merge candidates included in the merge candidate list may be signaled at a picture level.
[0214] Fig.16 is a view illustrating an example of a picture parameter set (PPS) including information about the maximum number of merge candidates.
[0215] Reference Fig.16 , a picture parameter set (PPS) may include a maximum number of syntax elements regarding merge candidates.
[0216] For example, a picture parameter set (PPS) may include pps_six_minus_max_num_merge_cand_plus1. ps_six_minus_max_num_merge_cand_plus1 may specify whether a syntax element (e.g., pic_six_minus_max_num_merge_cand) for deriving a maximum number of merge candidates exists in a picture header of a reference picture parameter set (PPS). For example, pps_six_minus_max_num_merge_cand_plus1 having a first value (e.g., 0) may specify that pic_six_minus_max_num_merge_cand exists in a picture header. Conversely, a pps_six_minus_max_num_merge_cand_plus1 having a value (e.g., 1) greater than the first value may specify that pic_six_minus_max_num_merge_cand does not exist in a picture header. The value of pps_six_minus_max_num_merge_cand_plus1 may be greater than or equal to 0 and may be less than or equal to 6.
[0217] In addition, the picture parameter set (PPS) may include pps_max_num_merge_cand_minus_max_num_triangle_cand_plus1. pps_max_num_merge_cand_minus_max_num_triangle_cand_plus1 may specify whether a syntax element (e.g., pic_max_num_merge_cand_minus_max_num_triangle_cand) for deriving a maximum number of TPM merge candidates is present in a picture header of a slice of a reference picture parameter set (PPS). For example, pps_max_num_merge_cand_minus_max_num_triangle_cand_plus1 having a first value (e.g., 0) may specify whether pic_max_num_merge_cand_minus_max_num_triangle_cand is present in a picture header. Conversely, pps_max_num_merge_cand_minus_max_num_triangle_cand_plus1 having a value (eg, 1) greater than the first value may specify that pic_max_num_merge_cand_minus_max_num_triangle_cand does not exist in the picture header. The value of pps_max_num_merge_cand_minus_max_num_triangle_cand_plus1 may be greater than or equal to 0 and may be less than or equal to a value obtained by subtracting 1 from pic_max_num_merge_cand_minus_max_num_triangle_cand.
[0218] pps_six_minus_max_num_merge_cand_plus1 and pps_max_num_merge_cand_minus_max_num_triangle_cand_plus1 may be signaled based on a predetermined flag (eg, constant_slice_header_params_enabled_flag). For example, when constant_slice_header_params_enabled_flag has a first value (eg, 0), pps_six_minus_max_num_merge_cand_plus1 and pps_max_num_merge_cand_minus_max_num_triangle_cand_plus1 may be inferred as the first value (eg, 0) without being signaled. In contrast, when constant_slice_header_params_enabled_flag has the second value (eg, 1), pps_six_minus_max_num_merge_cand_plus1 and pps_max_num_merge_cand_minus_max_num_triangle_cand_plus1 may be signaled.
[0219] Fig.17 is a view illustrating an example of a picture header including information about the maximum number of merging candidates.
[0220] Reference Fig.17 , the picture header may include syntax elements regarding whether the TMVP mode is available at the picture level.
[0221] For example, the picture header may include pic_temporal_mvp_enabled_flag. The pic_temporal_mvp_enabled_flag may specify whether the TMVP mode is available for the current picture that references the picture header. For example, a pic_temporal_mvp_enabled_flag having a first value (e.g., 0) may specify that the TMVP mode is not available for the current picture. Conversely, a pic_temporal_mvp_enabled_flag having a second value (e.g., 1) may specify that the TMVP mode is available for the current picture.
[0222] The pic_temporal_mvp_enabled_flag may be signaled only when the TMVP mode is available at the sequence level (e.g., sps_temporal_mvp_enabled_flag == 1). When the pic_temporal_mvp_enabled_flag is not signaled, the value of the pic_temporal_mvp_enabled_flag may be inferred to be a first value (e.g., 0). In addition, when there is no reference picture having the same spatial resolution as the current picture in the decoded picture buffer (DPB), the value of the pic_temporal_mvp_enabled_flag may be limited to a first value (e.g., 0).
[0223] In addition, the picture header may include pic_six_minus_max_num_merge_cand. pic_six_minus_max_num_merge_cand may be used to derive the maximum number of normal merge candidates supported in a slice associated with the picture header in normal merge mode. For example, the maximum number of normal merge candidates (e.g., MaxNumMergeCand) may be derived by subtracting the value of pic_six_minus_max_num_merge_cand from 6. In this case, the maximum number of normal merge candidates may be greater than or equal to 1 and may be less than or equal to 6.
[0224] pic_six_minus_max_num_merge_cand may be signaled only when pps_six_minus_max_num_merge_cand_plus1 signaled by a picture parameter set (PPS) has a first value, for example, 0. When pic_six_minus_max_num_merge_cand is not signaled, the value of pic_six_minus_max_num_merge_cand may be inferred as a value obtained by subtracting 1 from the value of pps_six_minus_max_num_merge_cand_plus1.
[0225] In addition, the picture header may include pic_five_minus_max_num_subblock_merge_cand. pic_five_minus_max_num_subblock_merge_cand may be used to derive the maximum number of subblock merge candidates supported in a slice associated with the picture header in subblock-based merge mode. For example, the maximum number of subblock merge candidates (e.g., MaxNumSubblockMergeCand) may be derived by subtracting the value of pic_six_minus_max_num_merge_cand from 5. In this case, the maximum number of subblock merge candidates may be greater than or equal to 0 and may be less than or equal to 5.
[0226] pic_five_minus_max_num_subblock_merge_cand may be signaled only when the affine mode is available at the sequence level (e.g., sps_affine_enabled_flag == 1). When pic_five_minus_max_num_subblock_merge_cand is not signaled, the value of pic_five_minus_max_num_subblock_merge_cand may be inferred as a predetermined value based on a first flag (e.g., sps_sbtmvp_enabled_flag) that specifies whether a subblock-based temporal motion vector predictor (TMVP) mode is available at the sequence level and a second flag (e.g., pic_temporal_mvp_enabled_flag) that specifies whether the TMVP mode is available at the picture level. For example, the value of pic_five_minus_max_num_subblock_merge_cand may be inferred as a value obtained by subtracting an AND operation result (e.g., 1 or 0) of the first flag and the second flag from 5.
[0227] In addition, the picture header may include pic_max_num_merge_cand_minus_max_num_triangle_cand. pic_max_num_merge_cand_minus_max_num_triangle_cand may be used to derive the maximum number of TPM merge candidates supported in a slice associated with the picture header in the TPM. For example, the maximum number of TPM merge candidates (e.g., MaxNumTriangleMergeCand) may be derived by subtracting the value of pic_max_num_merge_cand_minus_max_num_triangle_cand from the maximum number of regular merge candidates (e.g., MaxNumMergeCand). In this case, the maximum number of TPM merge candidates may be greater than or equal to 2 and may be less than or equal to the maximum number of regular merge candidates.
[0228] pic_max_num_merge_cand_minus_max_num_triangle_cand can be signaled only when TPM is enabled at the sequence level (e.g., sps_triangle_enabled_flag==1), the maximum number of regular merge candidates is greater than or equal to 2 (e.g., MaxNumMergeCand≥2), and pps_max_num_merge_cand_minus_max_num_triangle_cand_plus1 signaled by the picture parameter set (PPS) has a first value (e.g., 0).
[0229] As a case where pic_max_num_merge_cand_minus_max_num_triangle_cand is not signaled, when TPM is available at the sequence level (e.g., sps_triangle_enabled_flag==1) and the maximum number of regular merge candidates is greater than or equal to 2 (e.g., MaxNumMergeCand≥2), the value of pic_max_num_merge_cand_minus_max_num_triangle_cand may be inferred as a value obtained by subtracting 1 from the value of pps_max_num_merge_cand_minus_max_num_triangle_cand_plus1 signaled through a picture parameter set (PPS). Alternatively, as a case where pic_max_num_merge_cand_minus_max_num_triangle_cand is not signaled, when TPM is not available at the sequence level (e.g., sps_triangle_enabled_flag == 0) or the maximum number of normal merge candidates is less than 2 (e.g., MaxNumMergeCand<2), the maximum number of normal merge candidates may be set to a first value (e.g., 0). In this case, TPM may not be available for slices associated with the picture header.
[0230] In addition, the picture header may include pic_six_minus_max_num_ibc_merge_cand. pic_six_minus_max_num_ibc_merge_cand may be used to derive the maximum number of IBC merge candidates supported in a slice associated with the picture header under intra block copy (IBC). For example, the maximum number of IBC merge candidates (e.g., MaxNumIbcMergeCand) may be derived by subtracting the value of pic_six_minus_max_num_ibc_merge_cand from 6. In this case, the maximum number of IBC merge candidates may be greater than or equal to 1 and may be less than or equal to 6.
[0231] According to the above reference Fig.16 and Fig.17In the described example, in various inter prediction modes such as normal merge mode, subblock-based merge mode, etc., information about the maximum number of merge candidates may be signaled through a picture parameter set (PPS) and / or a picture header. However, in an actual system implementation system, there are not many use cases in which the number of merge candidates varies according to pictures. Therefore, when information about the maximum number of merge candidates is signaled through a picture parameter set (PPS) and / or a picture header, signaling overhead may be unnecessarily increased.
[0232] In addition, information about the maximum number of merge candidates may be signaled through a picture parameter set (PPS) and / or a picture header based on predetermined information signaled at a sequence level (e.g., sps_affine_enabled_flag, sps_sbtmvp_enabled_flag, etc.) That is, the maximum number of merge candidates may be determined based on a plurality of information occasionally signaled at a sequence level and a picture level, and as a result, tool control of various inter prediction modes may become complicated.
[0233] To solve these problems, according to an embodiment of the present disclosure, information about the maximum number of merge candidates can be signaled as a whole through a sequence level (e.g., a sequence parameter set (SPS)). Therefore, signaling overhead can be reduced and tool control of various inter-frame prediction modes can become easier.
[0234] Hereinafter, embodiments of the present disclosure will be described in detail with reference to the accompanying drawings.
[0235] First embodiment
[0236] According to the first embodiment, in various inter prediction modes, information on the maximum number of merge candidates may be integrally defined as a syntax (eg, a sequence parameter set (SPS)) having a level higher than a picture level.
[0237] Fig.18 is a view illustrating an example of a picture parameter set (PPS) according to an embodiment of the present disclosure.
[0238] Reference Fig.18 , and refer to the above Fig.16Unlike the picture parameter set (PPS) described in the description, the picture parameter set (PPS) may not include information about the maximum number of merge candidates. For example, the picture parameter set (PPS) may not include the syntax element pps_six_minus_max_num_merge_cand_plus1 about the maximum number of normal merge candidates and the syntax element pps_max_num_merge_cand_minus_max_num_triangle_cand_plus1 about the maximum number of TPM merge candidates. Therefore, the normal merge mode and the tool control of the TPM can be performed independently of the picture parameter set (PPS).
[0239] Fig.19 is a view illustrating an example of a sequence parameter set (SPS) according to an embodiment of the present disclosure.
[0240] Reference Fig.19 , a sequence parameter set (SPS) may include information about the maximum number of merging candidates.
[0241] For example, a sequence parameter set (SPS) may include sps_six_minus_max_num_merge_cand. sps_six_minus_max_num_merge_cand may be used to derive the maximum number of normal merge candidates in normal merge mode. For example, the maximum number of normal merge candidates may be derived based on sps_six_minus_max_num_merge_cand as shown in Equation 3 below.
[0242] [Formula 3]
[0243] MaxNumMergeCand=6-sps_six_minus_max_num_merge_cand
[0244] Among them, MaxNumMergeCand may mean the maximum number of regular merge candidates. In an example, the value of MaxNumMergeCand may be greater than or equal to 1 and may be less than or equal to 6.
[0245] In addition, the sequence parameter set (SPS) may include sps_five_minus_max_num_subblock_merge_cand. sps_five_minus_max_num_subblock_merge_cand may be used to derive the maximum number of subblock merging candidates in the subblock-based merging mode. For example, the maximum number of subblock merging candidates may be derived based on sps_five_minus_max_num_subblock_merge_cand as shown in Equation 4 below.
[0246] [Formula 4]
[0247] MaxNumSubblockMergeCand=5-sps_five_minus_max_num_subblock_merge_cand
[0248] Among them, MaxNumSubblockMergeCand may mean the maximum number of subblock merge candidates. In an example, the value of MaxNumSubblockMergeCand may be greater than or equal to 0 and may be less than or equal to 5.
[0249] sps_five_minus_max_num_subblock_merge_cand may be signaled only when the affine mode is available at the sequence level (e.g., sps_affine_enabled_flag == 1). When sps_five_minus_max_num_subblock_merge_cand is not signaled, the value of sps_five_minus_max_num_subblock_merge_cand may be inferred as a predetermined value based on a first flag (e.g., sps_sbtmvp_enabled_flag) that specifies whether the sub-block-based TMVP mode is available at the sequence level. For example, the value of sps_five_minus_max_num_subblock_merge_cand may be inferred as a value obtained by subtracting the value of the first flag from 5.
[0250] In addition, the sequence parameter set (SPS) may include sps_max_num_merge_cand_minus_max_num_triangle_cand. sps_max_num_merge_cand_minus_max_num_triangle_cand may be used to derive the maximum number of TPM merge candidates in a triangle partition mode (TPM). For example, the maximum number of TPM merge candidates may be derived based on sps_max_num_merge_cand_minus_max_num_triangle_cand as shown in Equation 5 below.
[0251] [Formula 5]
[0252] MaxNumTriangleMergeCand=MaxNumMergeCand-sps_max_num_merge_cand_minus_max_num_triangle_cand
[0253] Among them, MaxNumTriangleMergeCand may mean the maximum number of TPM merge candidates, and MaxNumMergeCand may mean the maximum number of regular merge candidates. In an example, the value of MaxNumTriangleMergeCand may be greater than or equal to 2 and may be less than or equal to the maximum number of regular merge candidates (eg, MaxNumMergeCand).
[0254] sps_max_num_merge_cand_minus_max_num_triangle_cand may be signaled only when TPM is available at the sequence level (e.g., sps_triangle_enabled_flag == 1) and the maximum number of regular merge candidates is greater than or equal to 2 (e.g., MaxNumMergeCand ≥ 2). In the case where sps_max_num_merge_cand_minus_max_num_triangle_cand is not signaled, when TPM is not available at the sequence level (e.g., sps_triangle_enabled_flag == 0) or the maximum number of regular merge candidates is less than 2 (e.g., MaxNumMergeCand < 2), the maximum number of TPM merge candidates may be set to 0. In this case, TPM may not be allowed.
[0255] In addition, the sequence parameter set (SPS) may include sps_six_minus_max_num_ibc_merge_cand. sps_six_minus_max_num_ibc_merge_cand may be used to derive the maximum number of IBC merge candidates under intra block copy (IBC). For example, the maximum number of IBC merge candidates may be derived based on sps_six_minus_max_num_ibc_merge_cand as shown in Equation 6 below.
[0256] [Formula 6]
[0257] MaxNumIbcMergeCand=6-sps_six_minus_max_num_ibc_merge_cand
[0258] Among them, MaxNumIbcMergeCand may mean the maximum number of IBC merge candidates. In an example, the value of MaxNumIbcMergeCand may be greater than or equal to 1 and may be less than or equal to 6.
[0259] When the sequence parameter set (SPS) includes information about the maximum number of merging candidates, Fig.17 Unlike the picture header described above, the picture header of the reference sequence parameter set (SPS) may not include syntax elements about whether the TMVP mode is available at the picture level (e.g., pic_temporal_mvp_enabled_flag) and syntax elements about the maximum number of merge candidates (e.g., pic_six_minus_max_num_merge_cand, pic_five_minus_max_num_subblock_merge_cand, pic_max_num_merge_cand_minus_max_num_triangle_cand, and pic_six_minus_max_num_ibc_merge_cand).
[0260] According to the above reference Fig.18 and Fig.19In the first embodiment described, in various inter prediction modes, information about the maximum number of merge candidates can be integrally defined in a syntax having a higher level than a picture level (e.g., a sequence parameter set (SPS)). Therefore, compared with the case where information about the maximum number of merge candidates is signaled through a picture parameter set (PPS) and / or a picture header, signaling overhead can be reduced. In addition, information about the maximum number of merge candidates can be signaled based on predetermined information (e.g., sps_affine_enabled_flag, sps_sbtmvp_enabled_flag, etc.) in the same high-level syntax (e.g., a sequence parameter set (SPS)). Therefore, tool control of various inter prediction modes such as a normal merge mode, a sub-block-based merge mode, etc. can become easier.
[0261] Furthermore, in the example, when the syntax element pic_temporal_mvp_enabled_flag specifying whether the TMVP mode is available at the picture level is excluded from the picture header, some signaling conditions in the slice header may be as follows: Fig. 20 Modifications shown.
[0262] Fig. 20 is a view illustrating an example of a slice header according to an embodiment of the present disclosure.
[0263] Reference Fig. 20 , identification information (eg, collocated_from_l0_flag and collocated_ref_idx) of the collocated picture colPic may be signaled based on whether the TMVP mode is available at the sequence level, regardless of whether the TMVP mode is available at the picture level.
[0264] Second embodiment
[0265] According to the second embodiment, similar to the first embodiment, information about the maximum number of merge candidates (e.g., sps_six_minus_max_num_merge_cand, sps_five_minus_max_num_subblock_merge_cand, etc.) may be integrally defined in a syntax having a higher level than a picture level (e.g., a sequence parameter set (SPS)). Fig.18 The picture parameter set (PPS) described above refers to Fig.19 The described sequence parameter set (SPS) is applicable to the second embodiment. However, the semantics of some syntax elements and the picture header structure of the second embodiment may be different from the first embodiment. Hereinafter, the second embodiment will be described in detail focusing on the differences from the first embodiment.
[0266] Fig.21 is a view illustrating an example of a picture header according to an embodiment of the present disclosure.
[0267] Reference Fig.21 , according to an embodiment of the present disclosure, the picture header may not include a syntax element regarding the maximum number of merge candidates. Specifically, when the sequence parameter set (SPS) includes a syntax element regarding the maximum number of merge candidates, the same as above with reference to Fig.17 Unlike the picture header described above, the picture header of the reference sequence parameter set (SPS) may not include syntax elements regarding the maximum number of merge candidates (e.g., pic_six_minus_max_num_merge_cand, pic_five_minus_max_num_subblock_merge_cand, pic_max_num_merge_cand_minus_max_num_triangle_cand, and pic_six_minus_max_num_ibc_merge_cand).
[0268] However, the picture header may include a syntax element pic_temporal_mvp_enabled_flag regarding whether the TMVP mode is available at a picture level. In this respect, the second embodiment may be different from the first embodiment.
[0269] pic_temporal_mvp_enabled_flag may specify whether the TMVP mode is available for the current picture of the reference picture header. For example, pic_temporal_mvp_enabled_flag having a first value (e.g., 0) may specify that the TMVP mode is not available for the current picture. Conversely, pic_temporal_mvp_enabled_flag having a second value (e.g., 1) may specify that the TMVP mode is available for the current picture of the reference picture header.
[0270] The pic_temporal_mvp_enabled_flag may be signaled only when the TMVP mode is available at the sequence level (e.g., sps_temporal_mvp_enabled_flag == 1). When the pic_temporal_mvp_enabled_flag is not signaled, the value of the pic_temporal_mvp_enabled_flag may be inferred to be a first value (e.g., 0). In addition, when there is no reference picture having the same spatial resolution as the current picture in the decoded picture buffer (DPB), the value of the pic_temporal_mvp_enabled_flag may be limited to a first value (e.g., 0).
[0271] When the picture header includes pic_temporal_mvp_enabled_flag, the above reference Fig.19 The semantics of the syntax element sps_five_minus_max_num_subblock_merge_cand regarding sub-block based merge mode in the described sequence parameter set (SPS) may be partially modified as follows.
[0272] When sps_five_minus_max_num_subblock_merge_cand is not signaled (eg, sps_affine_enabled_flag == 0), the value of sps_five_minus_max_num_subblock_merge_cand may be inferred to be a predetermined value (eg, 5).
[0273] In an example, when sps_five_minus_max_num_subblock_merge_cand is inferred to be a predetermined value (eg, 5), the variable IsInfered may be set to true. In addition, the maximum number of subblock merging candidates derived based on Equation 4 above may be updated based on pic_temporal_mvp_enabled_flag and IsInfered as shown in Equation 7 below.
[0274] [Formula 7]
[0275] MaxNumSubblockMergeCand=(IsInfered&&(sps_sbtmvp_enabled_flag&&pic_temporal_mvp_enabled_flag))? 1:MaxNumSubblockMergeCand
[0276] Among them, MaxNumSubblockMergeCand may mean the maximum number of subblock merge candidates. In an example, the value of MaxNumSubblockMergeCand may be greater than or equal to 0 and may be less than or equal to 5.
[0277] Referring to Formula 7, when IsInfered is true and the AND operation result of sps_sbtmvp_enabled_flag and pic_temporal_mvp_enabled_flag is true, the value of MaxNumSubblockMergeCand may be updated to a predetermined value (e.g., 1). Conversely, when IsInfered or at least one of the AND operation results of sps_sbtmvp_enabled_flag and pic_temporal_mvp_enabled_flag is false, the value of MaxNumSubblockMergeCand may not be updated. In addition, Formula 7 may be defined as the semantics of pic_temporal_mvp_enabled_flag at the picture header, or may be defined as the semantics of sps_five_minus_max_num_subblock_merge_cand at the sequence parameter set (SPS).
[0278] In another example, when sps_five_minus_max_num_subblock_merge_cand is inferred to be a predetermined value (e.g., 5), the variable IsInfered may be set to true. In addition, the maximum number of subblock merge candidates may be derived based on sps_five_minus_max_num_subblock_merge_cand, pic_temporal_mvp_enabled_flag, and IsInfered as shown in the following equation 8. That is, the above equation 4 may be replaced by equation 8.
[0279] [Formula 8]
[0280] MaxNumSubblockMergeCand=5-sps_five_minus_max_num_subblock_merge_cand+(IsInfered&&(sps_sbtmvp_enabled_flag&&pic_temporal_mvp_enabled_flag))? 1:0
[0281] Among them, MaxNumSubblockMergeCand may mean the maximum number of subblock merge candidates. In an example, the value of MaxNumSubblockMergeCand may be greater than or equal to 0 and may be less than or equal to 5.
[0282] Referring to Formula 8, when IsInfered is true and the AND operation result of sps_sbtmvp_enabled_flag and pic_temporal_mvp_enabled_flag is true, the value of MaxNumSubblockMergeCand can be derived by adding 1 to the value obtained by subtracting the value of sps_five_minus_max_num_subblock_merge_cand from 5. Conversely, when IsInfered or at least one of the AND operation results of sps_sbtmvp_enabled_flag and pic_temporal_mvp_enabled_flag is false, the value of MaxNumSubblockMergeCand can be derived by subtracting the value of sps_five_minus_max_num_subblock_merge_cand from 5. Furthermore, Equation 8 may be defined as the semantics of pic_temporal_mvp_enabled_flag at a picture header, or may be defined as the semantics of sps_five_minus_max_num_subblock_merge_cand at a sequence parameter set (SPS).
[0283] In another example, the reference value for deriving the maximum number of subblock merging candidates may be changed from 5 to 4. Therefore, the name of sps_five_minus_max_num_subblock_merge_cand may also be changed to sps_four_minus_max_num_subblock_merge_cand.
[0284] When sps_four_minus_max_num_subblock_merge_cand is not signaled (eg, sps_affine_enabled_flag==0), the value of sps_four_minus_max_num_subblock_merge_cand may be inferred to be a predetermined value (eg, 4) regardless of whether the subblock-based TMVP mode is available at the sequence level. In addition, the above Equations 4 and 7 may be replaced by the following Equations 9 and 10, respectively.
[0285] [Formula 9]
[0286] MaxNumSubblockMergeCand=4-sps_four_minus_max_num_subblock_merge_cand
[0287] [Formula 10]
[0288] MaxNumSubblockMergeCand+=(sps_sbtmvp_enabled_flag&&pic_temporal_mvp_enabled_flag))? 1:0
[0289] Here, MaxNumSubblockMergeCand may mean the maximum number of sub-block merge candidates.
[0290] Referring to Equation 9 and Equation 10 together, the value of MaxNumSubblockMergeCand may be derived by subtracting the value of sps_four_minus_max_num_subblock_merge_cand from 4. In addition, the value of MaxNumSubblockMergeCand may be updated based on the AND operation result of sps_sbtmvp_enabled_flag and pic_temporal_mvp_enabled_flag. For example, when the AND operation result of sps_sbtmvp_enabled_flag and pic_temporal_mvp_enabled_flag is true, the value of MaxNumSubblockMergeCand may be increased by 1. Conversely, when the AND operation result of sps_sbtmvp_enabled_flag and pic_temporal_mvp_enabled_flag is false, the value of MaxNumSubblockMergeCand may not be updated. Furthermore, Equation 10 may be defined as the semantics of pic_temporal_mvp_enabled_flag at a picture header, or may be defined as the semantics of sps_four_minus_max_num_subblock_merge_cand at a sequence parameter set (SPS).
[0291] According to the above reference Fig.21In the second embodiment described, in various inter-frame prediction modes, information about the maximum number of merge candidates can be integrally defined in a syntax having a higher level than the picture level (e.g., a sequence parameter set (SPS)). Therefore, compared with the case where information about the maximum number of merge candidates is signaled through a picture parameter set (PPS) and / or a picture header, signaling overhead can be reduced. In addition, information about the maximum number of merge candidates can be signaled based on predetermined information (e.g., sps_affine_enabled_flag, sps_sbtmvp_enabled_flag, etc.) in the same high-level syntax (e.g., a sequence parameter set (SPS)). Therefore, tool control of various inter-frame prediction modes such as a normal merge mode, a sub-block-based merge mode, etc. can become easier.
[0292] In the following, reference will be made to Fig. 22 and Fig.23 An image encoding / decoding method according to an embodiment of the present disclosure is described in detail.
[0293] Fig. 22 is a flowchart illustrating an image encoding method according to an embodiment of the present disclosure.
[0294] Fig. 22 The image encoding method can be Figure 2 For example, steps S2210 and S2220 may be performed by the inter-frame prediction unit 180. In addition, step S2230 may be performed by the entropy coding unit 190.
[0295] Reference Fig. 22 , when the inter-frame prediction mode is applied to the current block, the image encoding device can construct a merge candidate list of the current block based on the prediction mode of the current block (S2210).
[0296] Specifically, the prediction mode of the current block may be determined as any one of various inter prediction modes (eg, normal merge mode, subblock-based merge mode, triangular partitioning for inter prediction (TPM) or intra block copy (IBC), etc.).
[0297] The image encoding device may derive a merge candidate based on the prediction mode of the current block and construct a merge candidate list using the derived merge candidate. Here, the merge candidate may be derived from a neighboring block (e.g., a spatial neighboring block and / or a temporal neighboring block) of the current block. Depending on the prediction mode of the current block, the merge candidate may be variously referred to as a conventional merge candidate, a sub-block merge candidate, a TPM merge candidate, etc.
[0298] The image encoding device may insert additional merge candidates into the merge candidate list until the number of merge candidates included in the merge candidate list reaches a predetermined maximum number. Here, the additional merge candidates may include, for example, at least one of a history-based merge candidate, a pairwise average merge candidate, an ATMVP, a combined bi-prediction merge candidate (when the slice / patch group type of the current slice / patch group is type B) and / or a zero vector merge candidate. In addition, when the number of merge candidates included in the merge candidate list is greater than or equal to the predetermined maximum number, the image encoding device may complete the construction of the merge candidate list.
[0299] The image encoding device may derive motion information of the current block based on the constructed merge candidate list (S2220). Specifically, the image encoding device may select an optimal merge candidate from the merge candidates included in the merge candidate list based on the RD cost and derive the motion information of the selected merge candidate as the motion information of the current block. In this case, the image encoding device may generate a prediction block of the current block by performing inter-frame prediction based on the derived motion information.
[0300] The image encoding device may encode the motion information of the current block and the information about the maximum number of merge candidates (S2230). Here, the motion information of the current block may include candidate selection information (e.g., a merge index) specifying the selected merge candidate. In addition, the information about the maximum number of merge candidates may include information about each inter-frame prediction mode and may be used to derive the maximum number of merge candidates.
[0301] According to an embodiment of the present disclosure, information about the maximum number of merge candidates may be encoded as a whole in a syntax having a higher level than the picture level, for example, a sequence parameter set (SPS). For example, the sequence parameter set (SPS) may include information about the maximum number of merge candidates for a conventional merge mode, sps_six_minus_max_num_merge_cand. In addition, the sequence parameter set (SPS) may include information about the maximum number of merge candidates for a sub-block-based merge mode, sps_five_minus_max_num_subblock_merge_cand. In addition, the sequence parameter set (SPS) may include information about the maximum number of merge candidates for a TPM, sps_max_num_merge_cand_minus_max_num_triangle_cand. In addition, the sequence parameter set (SPS) may include information about the maximum number of merge candidates for an IBC, sps_six_minus_max_num_ibc_merge_cand. Refer to the above Fig.19 An example of a sequence parameter set (SPS) is described. Fig.19In the embodiment, the information about the maximum number of merge candidates is shown as being included only in the sequence parameter set, but this may be modified differently according to the implementation. For example, some of the above sps_six_minus_max_num_merge_cand, sps_five_minus_max_num_subblock_merge_cand, sps_max_num_merge_cand_minus_max_num_triangle_cand, and sps_six_minus_max_num_ibc_merge_cand may be included in the picture header, as described above with reference to Fig.17 Described.
[0302] In addition, in the sub-block based merge mode, the maximum number of merge candidates may be determined based on whether the affine mode is available for the current block. Specifically, when the affine mode is available (e.g., sps_affine_enabled_flag==1), the maximum number of merge candidates may be determined as a value obtained by subtracting the value of sps_five_minus_max_num_subblock_merge_cand from 5. Conversely, when the affine mode is not available (e.g., sps_affine_enabled_flag==0), the maximum number of merge candidates may be determined based on whether the sub-block based temporal motion vector predictor (TMVP) mode is available for the current block (e.g., sps_sbtmvp_enabled_flag) and whether the temporal motion vector predictor (TMVP) mode is available for the current block (e.g., pic_temporal_mvp_enabled_flag). For example, when at least one of the sub-block based TMVP mode or the TMVP mode is not available, the maximum number of merge candidates may be determined as a first value (e.g., 0). In contrast, when both the sub-block based TMVP mode and the TMVP mode are available, the maximum number of merge candidates may be determined as a second value (e.g., 1). Thus, in the sub-block based merge mode, information about the maximum number of merge candidates may be signaled at the sequence level, but the maximum number of merge candidates may be determined at the picture level together with consideration of whether the TMVP mode is available at the picture level.
[0303] According to an embodiment of the present disclosure, when information about the maximum number of merging candidates is integrally encoded in a syntax having a higher level than a picture level (eg, a sequence parameter set (SPS)), signaling overhead may be further reduced.
[0304] Fig.23 is a flowchart illustrating an image decoding method according to an embodiment of the present disclosure.
[0305] Fig.23 The image decoding method can be Figure 3 For example, steps S2310 to S2330 may be performed by the inter-frame prediction unit 260.
[0306] Reference Fig.23 , when the inter-frame prediction mode is applied to the current block, the image decoding device can construct a merge candidate list of the current block based on the prediction mode of the current block (S2310).
[0307] Specifically, the image decoding device may derive a merge candidate based on the prediction mode of the current block and use the derived merge candidate to construct a merge candidate list. Here, the merge candidate may be derived from a neighboring block (e.g., a spatial neighboring block and / or a temporal neighboring block) of the current block. In addition, when the number of merge candidates included in the merge candidate list is greater than or equal to a predetermined maximum number, the image decoding device may complete the construction of the merge candidate list.
[0308] According to an embodiment of the present disclosure, the maximum number of merge candidates can be determined based on information about the maximum number of merge candidates obtained through a syntax having a level higher than the picture level (e.g., a sequence parameter set (SPS)). For example, the sequence parameter set (SPS) may include information about the maximum number of merge candidates for the conventional merge mode, sps_six_minus_max_num_merge_cand. In addition, the sequence parameter set (SPS) may include information about the maximum number of merge candidates for the sub-block based merge mode, sps_five_minus_max_num_subblock_merge_cand. In addition, the sequence parameter set (SPS) may include information about the maximum number of merge candidates for the TPM, sps_max_num_merge_cand_minus_max_num_triangle_cand. In addition, the sequence parameter set (SPS) may include information about the maximum number of merge candidates for the IBC, sps_six_minus_max_num_ibc_merge_cand. Refer to the above Fig.19 An example of a sequence parameter set (SPS) is described. Fig.19In the embodiment, the information about the maximum number of merge candidates is shown as being included only in the sequence parameter set, but this may be modified differently according to the implementation. For example, some of the above sps_six_minus_max_num_merge_cand, sps_five_minus_max_num_subblock_merge_cand, sps_max_num_merge_cand_minus_max_num_triangle_cand, and sps_six_minus_max_num_ibc_merge_cand may be included in the picture header, as described above with reference to Fig.17 Described.
[0309] In addition, in the sub-block based merge mode, the maximum number of merge candidates can be determined based on whether the affine mode is available for the current block. Specifically, when the affine mode is available (e.g., sps_affine_enabled_flag==1), the maximum number of merge candidates can be determined based on information about the maximum number of merge candidates obtained through the sequence parameter set (e.g., sps_five_minus_max_num_subblock_merge_cand). For example, the maximum number of merge candidates can be determined as a value obtained by subtracting the value of sps_five_minus_max_num_subblock_merge_cand from 5. On the contrary, when the affine mode is not available (e.g., sps_affine_enabled_flag==0), the maximum number of merge candidates can be determined based on whether the sub-block based temporal motion vector predictor (TMVP) mode is available for the current block and whether the temporal motion vector predictor (TMVP) mode is available for the current block. For example, when the sub-block based TMVP mode or at least one of the TMVP modes is not available, the maximum number of merge candidates can be determined as a first value (e.g., 0). In contrast, when both the sub-block based TMVP mode and the TMVP mode are available, the maximum number of merge candidates may be determined as a second value (eg, 1).
[0310] Whether the sub-block based TMVP mode is available for the current block may be determined based on a predetermined first flag (e.g., sps_sbtmvp_enabled_flag) obtained through a sequence parameter set. For example, when sps_sbtmvp_enabled_flag has a first value (e.g., 0), the sub-block based TMVP mode may not be available. Conversely, when sps_sbtmvp_enabled_flag has a second value (e.g., 1), the sub-block based TMVP mode may be available. Whether the TMVP mode is available for the current block may be determined based on a predetermined second flag (e.g., pic_temporal_mvp_enabled_flag) obtained through a picture header. For example, when pic_temporal_mvp_enabled_flag has a first value (e.g., 0), the TMVP mode may not be available. Conversely, when pic_temporal_mvp_enabled_flag has a second value (e.g., 1), the TMVP mode may be available. In this way, in the sub-block based merge mode, information about the maximum number of merge candidates can be signaled at the sequence level, but the maximum number of merge candidates can be determined at the picture level together with considering whether the TMVP mode is available at the picture level.
[0311] In an example, when the affine mode is available in the subblock based merge mode, the maximum number of merge candidates may have a predetermined range according to whether the subblock based TMVP mode is available.
[0312] Specifically, sps_five_minus_max_num_subblock_merge_cand may have a range from 0 to "5-sps_sbtmvp_enabled_flag" (inclusive). Therefore, when the sub-block-based TMVP mode is available (e.g., sps_sbtmvp_enabled_flag==1), sps_five_minus_max_num_subblock_merge_cand may have a range from 0 to 4 (inclusive). Conversely, when the sub-block-based TMVP mode is not available (e.g., sps_sbtmvp_enabled_flag==0), sps_five_minus_max_num_subblock_merge_cand may have a range from 0 to 5 (inclusive). In addition, when the affine mode is available (e.g., sps_affine_enabled_flag==1), the maximum number of merge candidates may be "5-sps_five_minus_max_num_subblock_merge_cand". Therefore, as the case where the affine mode is available in the sub-block based merge candidate (e.g., sps_affine_enabled_flag==1), when the sub-block based TMVP mode is available (e.g., sps_sbtmvp_enabled_flag==1), the maximum number of merge candidates may have a range from 0 to 5 (inclusive). Conversely, as the case where the affine mode is available in the sub-block based merge mode (e.g., sps_affine_enabled_flag==1), when the sub-block based TMVP mode is not available (e.g., sps_sbtmvp_enabled_flag==0), the maximum number of merge candidates may have a range from 0 to 5 (inclusive).
[0313] Continue to refer to Fig.23 , the image decoding device may derive motion information of the current block based on the constructed merge candidate list (S2320). Specifically, the image decoding device may select at least one merge candidate from the merge candidates included in the merge candidate list based on candidate selection information (e.g., merge index) obtained from the bitstream. In addition, the image decoding device may derive motion information of the selected merge candidate as motion information of the current block.
[0314] The image decoding apparatus may generate a prediction block of the current block by performing inter prediction based on the derived motion information (S2330). The current block may be reconstructed based on the generated prediction block as described above.
[0315] According to an embodiment of the present disclosure, when various information for determining the maximum number of merge candidates is integrated into a syntax having a higher level than a picture level, such as a sequence parameter set (SPS), tool control of various inter prediction modes may become easier.
[0316] The names of the syntax elements described in the present disclosure may include information about the location of the corresponding syntax element being signaled. For example, a syntax element starting with "sps_" may mean that the corresponding syntax element is signaled in a sequence parameter set (SPS). In addition, a syntax element starting with "pps_", "ph_", "sh_", etc. may mean that the corresponding syntax element is signaled in a picture parameter set (PPS), a picture header, a slice header, etc.
[0317] 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.
[0318] 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.
[0319] 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.
[0320] 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.
[0321] 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.
[0322] Fig.24 is a diagram showing a content streaming system to which an embodiment of the present disclosure can be applied.
[0323] like Fig.24 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.
[0324] 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.
[0325] 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.
[0326] 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.
[0327] 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.
[0328] 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.
[0329] Each server in the content streaming system may operate as a distributed server, in which case data received from each server may be distributed.
[0330] 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.
[0331] Industrial Applicability
[0332] 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: Constructing a sub-block merging candidate list of the current block based on a prediction mode of the current block; deriving motion information of the current block based on the sub-block merging candidate list; as well as generating a prediction block of the current block based on the motion information, wherein information about a maximum number of sub-block merging candidates included in the sub-block merging candidate list is obtained through a sequence parameter set, Wherein, based on the prediction mode being a sub-block based merge mode, the maximum number of the sub-block merge candidates is determined based on whether an affine mode is available for the current block, and Wherein, on the basis that the affine mode is available and the sub-block-based temporal motion vector prediction sub-TMVP mode is available, the value of the information about the maximum number of sub-block merge candidates has a range from 0 to 4, and the maximum number of sub-block merge candidates has a range from 1 to 5.
2. The image decoding method according to claim 1, wherein: Based on the prediction mode being the sub-block based merge mode and the affine mode being unavailable, the maximum number of merge modes is determined according to whether the sub-block based TMVP mode is available for the current block and whether the temporal motion vector prediction sub-TMVP mode is available for the current block.
3. The image decoding method according to claim 2, in, determining whether the sub-block based TMVP mode is available based on a first flag obtained through the sequence parameter set, and Wherein, whether the TMVP mode is available is determined based on a second flag obtained through a picture header.
4. The image decoding method according to claim 2, wherein: Based on at least one of the sub-block based TMVP mode or the TMVP mode being unavailable, the maximum number of merge candidates is determined to be a first value.
5. The image decoding method according to claim 2, wherein: Based on that both the sub-block based TMVP mode and the TMVP mode are available, the maximum number of merge candidates is determined to be a second value.
6. An image encoding method performed by an image encoding device, the image encoding method comprising the following steps: Constructing a sub-block merging candidate list of the current block based on a prediction mode of the current block; deriving motion information of the current block based on the sub-block merging candidate list; as well as encoding the motion information and information about a maximum number of sub-block merging candidates included in the sub-block merging candidate list, wherein the information about the maximum number of sub-block merging candidates included in the sub-block merging candidate list is encoded by a sequence parameter set, Wherein, based on the prediction mode being a sub-block based merge mode, the maximum number of the sub-block merge candidates is determined based on whether an affine mode is available for the current block, and Wherein, on the basis that the affine mode is available and the sub-block-based temporal motion vector prediction sub-TMVP mode is available, the value of the information about the maximum number of sub-block merge candidates has a range from 0 to 4, and the maximum number of sub-block merge candidates has a range from 1 to 5.
7. The image encoding method according to claim 6, wherein: Based on the prediction mode being the sub-block based merge mode and the affine mode being unavailable, the maximum number of merge modes is determined according to whether the sub-block based TMVP mode is available for the current block and whether the temporal motion vector prediction sub-TMVP mode is available for the current block.
8. The image encoding method according to claim 7, wherein: Based on at least one of the sub-block based TMVP mode or the TMVP mode being unavailable, the maximum number of merge candidates is determined to be a first value.
9. The image encoding method according to claim 7, wherein: Based on that both the sub-block based TMVP mode and the TMVP mode are available, the maximum number of merge candidates is determined to be a second value.
10. A method for transmitting a bit stream generated by an image encoding method, the image encoding method comprising the following steps: Constructing a sub-block merging candidate list of the current block based on a prediction mode of the current block; deriving motion information of the current block based on the sub-block merging candidate list; as well as encoding the motion information and information about a maximum number of sub-block merging candidates included in the sub-block merging candidate list, wherein the information about the maximum number of sub-block merging candidates included in the sub-block merging candidate list is encoded by a sequence parameter set, Wherein, based on the prediction mode being a sub-block based merge mode, the maximum number of the sub-block merge candidates is determined based on whether an affine mode is available for the current block, and Wherein, the affine mode is available and the sub-block based temporal motion vector prediction sub-TMVP mode is available Based on the information about the maximum number of sub-block merging candidates, a value has a range from 0 to 4, And the maximum number of sub-block merging candidates has a range from 1 to 5.
Citation Information
Patent Citations
Video image prediction method and device
CN111107354A
KR20190134521A