Image encoding / decoding method and apparatus, and method of transmitting bitstream using sequence parameter set including information on maximum number of merge candidates
The image encoding/decoding method optimizes the management of merging candidates using a sequence parameter set to enhance efficiency and reduce costs for high-resolution image transmission and storage.
Patent Information
- Application Number
- JP2024123043
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2020-01-12
- Filing Date
- 2024-07-30
- Publication Date
- 2024-10-07
- Estimated Expiration
- 2041-01-12
AI Technical Summary
The increasing demand for high-resolution, high-quality images leads to higher transmission and storage costs due to increased data volume, necessitating more efficient image compression techniques.
An image encoding/decoding method that utilizes a sequence parameter set to manage the maximum number of merging candidates in a merging candidate list, improving encoding/decoding efficiency and signaling efficiency in inter prediction modes.
Enhances encoding/decoding efficiency and reduces signaling overhead by optimizing the management of merging candidates, thereby lowering transmission and storage costs for high-resolution images.
Smart Images

Figure 2024138156000001_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 on the maximum number of merging candidates included in a merging candidate list using a sequence parameter set, and a method for transmitting a bitstream generated by the image encoding method / device of the present disclosure. [Background technology]
[0002] Recently, the demand for high-resolution, high-quality images, for example, HD (High Definition) images and UHD (Ultra High Definition) images, is increasing in various fields. As the resolution and quality of image data increases, the amount of information or bits transmitted increases relatively compared to conventional image data. The increase in the amount of information or bits transmitted leads to an increase in transmission costs and storage costs.
[0003] This requires a highly efficient image compression technique for effectively transmitting, storing, and reproducing high-resolution, high-quality image information. Summary of the Invention [Problem to be solved by the invention]
[0004] An object of the present disclosure is to provide an image encoding / decoding method and apparatus with improved encoding / decoding efficiency.
[0005] Another object of the present disclosure is to provide an image encoding / decoding method and apparatus for encoding / decoding information on the maximum number of merging candidates using a sequence parameter set.
[0006] Another object of the present disclosure is to provide a method for transmitting a bitstream generated by the image encoding method or apparatus according to the present disclosure.
[0007] Another object of the present disclosure is to provide a recording medium storing a bitstream 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 bitstream that is received by the image decoding device according to the present disclosure, decoded, and used to restore an image.
[0009] The technical problems to be solved by the present disclosure are not limited to the above-mentioned technical problems, and other technical problems not described above will be clearly understood by a person having ordinary skill in the art to which the present disclosure pertains from the following description. [Means for solving the problem]
[0010] An image decoding method according to one aspect of the present disclosure includes the steps of constructing a merge candidate list for 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 generating a prediction block for the current block based on the motion information, where information on the maximum number of merge candidates included in the merge candidate list is obtained via a sequence parameter set, and when the prediction mode is a sub-block based merge mode, the maximum number of merge candidates can be determined based on whether an affine mode is available for the current block.
[0011] An image decoding device according to another aspect of the present disclosure includes a memory and at least one processor, wherein the at least one processor configures a merge candidate list for a current block based on a prediction mode of the current block, derives motion information of the current block based on the merge candidate list, and generates a prediction block for the current block based on the motion information, wherein information on a maximum number of merge candidates included in the merge candidate list is obtained via a sequence parameter set, and when the prediction mode is a sub-block based merge mode, the maximum number of merge candidates can be determined based on whether an affine mode is available for the current block.
[0012] An image encoding method according to another aspect of the present disclosure includes the steps of constructing a merge candidate list for 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 on a maximum number of merge candidates included in the merge candidate list, wherein the information on the maximum number of merge candidates included in the merge candidate list is encoded in a sequence parameter set, and when the prediction mode is a sub-block based merge mode, the maximum number of merge candidates can be determined based on whether an affine mode is available for the current block.
[0013] A computer-readable recording medium according to another aspect of the present disclosure can store a bitstream generated by the image encoding method or image encoding device of the present disclosure.
[0014] The features described above in the brief summary of the present disclosure are merely exemplary embodiments of the detailed description of the present disclosure that follows and are not intended to limit the scope of the present disclosure. Effect of the Invention
[0015] According to the present disclosure, an image encoding / decoding method and apparatus with improved encoding / decoding efficiency can be provided.
[0016] 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.
[0017] In addition, the present disclosure can provide an image encoding / decoding method and apparatus with improved signaling efficiency in an inter prediction mode based on a merge candidate list.
[0018] Furthermore, according to the present disclosure, an image encoding / decoding method and apparatus that facilitate tool control in an inter prediction mode based on a merge candidate list can be provided.
[0019] According to the present disclosure, there can also be provided a method for transmitting a bitstream generated by the image encoding method or apparatus according to the present disclosure.
[0020] According to the present disclosure, a recording medium storing a bitstream generated by the image encoding method or apparatus according to the present disclosure can be provided.
[0021] Furthermore, according to the present disclosure, it is possible to provide a recording medium storing a bitstream that is received by the image decoding device according to the present disclosure, decoded, and used to restore an image.
[0022] The effects obtained by the present disclosure are not limited to the effects described above, and other effects not described above will be clearly understood by those having ordinary skill in the art to which the present disclosure pertains from the following description. [Brief description of the drawings]
[0023] [Figure 1] FIG. 1 is a schematic diagram illustrating a video coding system to which an embodiment of the present disclosure can be applied. [Diagram 2]1 is a diagram illustrating an image encoding device to which an embodiment of the present disclosure can be applied; [Diagram 3] 1 is a diagram illustrating an image decoding device to which an embodiment of the present disclosure can be applied; [Figure 4] 1 is a flowchart illustrating a video / image coding method based on inter prediction. [Diagram 5] 13 is a diagram illustrating an example configuration of an inter prediction unit 180 according to the present disclosure. [Figure 6] 1 is a flowchart illustrating a video / image decoding method based on inter prediction. [Figure 7] 13 is a diagram illustrating an example configuration of an inter prediction unit 260 according to the present disclosure. [Figure 8] FIG. 13 illustrates an example of neighboring blocks used as spatial merging candidates. [Figure 9] FIG. 2 is a schematic diagram illustrating a merge candidate list construction method according to an example of the present disclosure. [Figure 10] FIG. 2 is a diagram illustrating a motion vector predictor candidate list construction method according to an example of the present disclosure; [Figure 11] FIG. 13 is a diagram for explaining a parameter model of an affine mode. [Figure 12] FIG. 13 is a diagram illustrating a method for generating an affine merge candidate list. [Figure 13] FIG. 1 is a diagram for explaining peripheral blocks in sub-block-based TMVP mode. [Figure 14] A diagram to explain a method of deriving a motion vector field according to sub-block-based TMVP mode. [Figure 15] 13 is a diagram showing an example in which a triangular partitioning mode is applied to a current block and the current block is divided into two triangular partitions. [Figure 16] FIG. 13 is a diagram showing an example of a picture parameter set (PPS) including information regarding the maximum number of merging candidates. [Figure 17] FIG. 13 illustrates an example of a picture header including information regarding the maximum number of merging candidates. [Figure 18]FIG. 2 is a diagram showing an example of a picture parameter set (PPS) according to an embodiment of the present disclosure. [Figure 19] FIG. 2 is a diagram showing an example of a sequence parameter set (SPS) according to an embodiment of the present disclosure. [Figure 20] A diagram showing an example of a slice header according to one embodiment of the present disclosure. [Figure 21] FIG. 2 illustrates an example of a picture header according to one embodiment of the present disclosure. [Figure 22] 1 is a flowchart illustrating an image encoding method according to an embodiment of the present disclosure. [Figure 23] 1 is a flowchart illustrating an image decoding method according to an embodiment of the present disclosure. [Figure 24] FIG. 1 illustrates a content streaming system to which an embodiment of the present disclosure can be applied. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0024] The present disclosure will be described in detail below with reference to the accompanying drawings so that those skilled in the art can easily implement the present disclosure. However, the present disclosure may be embodied in various different forms and is not limited to the embodiments described herein.
[0025] In describing the embodiments of the present disclosure, if it is determined that a specific description of a known configuration or function may make the gist of the present disclosure unclear, the detailed description thereof will be omitted. In addition, in the drawings, parts that are not related to the description of the present disclosure are omitted, and similar parts are denoted by similar reference numerals.
[0026] In the present disclosure, when a certain component is "connected," "coupled," or "connected" to another component, this includes not only a direct connection relationship, but also an indirect connection relationship in which another component exists between them. Furthermore, when a certain component is described as "including" or "having" another component, this does not mean that the other component is excluded, but that the other component can be further included, unless otherwise specified.
[0027] In this disclosure, terms such as "first" and "second" are used only for the purpose of distinguishing one component from another component, and do not limit the order or importance of the components unless otherwise specified. Therefore, within the scope of this disclosure, a first component in one embodiment may be called a second component in another embodiment, and similarly, a second component in one embodiment may be called a first component in another embodiment.
[0028] In this disclosure, components that are distinguished from one another are used to clearly describe the characteristics of each component, and do not necessarily mean that the components are separate. In other words, multiple components may be integrated and configured as a single hardware or software unit, or one component may be distributed and configured as multiple hardware or software units. Thus, even if not otherwise stated, such integrated or distributed embodiments are also included in the scope of the present disclosure.
[0029] In the present disclosure, the components described in the various embodiments are not necessarily essential components, and some may be optional components. Therefore, an embodiment consisting of a subset of the components described in one embodiment is also included in the scope of the present disclosure. In addition, an embodiment including other components in addition to the components described in the various embodiments is also included in the scope of the present disclosure.
[0030] The present disclosure relates to image encoding and decoding, and terms used in this disclosure may have ordinary meanings in the technical field to which the present disclosure belongs, unless they are newly defined in this disclosure.
[0031] In this disclosure, a "picture" generally means a unit indicating any one image in a particular time period, a slice / tile is a coding unit constituting a part of a picture, and one picture may be composed of one or more slices / tiles. Also, a slice / tile may include one or more coding tree units (CTUs).
[0032] In this disclosure, a "pixel" or a "pel" may refer to the smallest unit constituting one picture (or image). A term corresponding to a pixel may be a "sample." A sample may generally indicate a pixel or a pixel value, may indicate only a pixel / pixel value of a luma component, or may indicate only a pixel / pixel value of a chroma component.
[0033] In this disclosure, a "unit" may refer to a basic unit of image processing. A unit may include at least one of a specific region of a picture and information related to the region. A unit may be used interchangeably with terms such as "sample array," "block," or "area," depending on the case. In a general case, an M×N block may include a set (or array) of samples or transform coefficients consisting of M columns and N rows.
[0034] In the present disclosure, a "current block" may refer to any one of a "current coding block," a "current coding unit," a "block to be coded," a "block to be decoded," or a "block to be processed." If prediction is performed, a "current block" may refer to a "current predicted block" or a "block to be predicted." If transformation (inverse transformation) / quantization (inverse quantization) is performed, a "current block" may refer to a "current transformed block" or a "block to be transformed." If filtering is performed, a "current block" may refer to a "block to be filtered."
[0035] Furthermore, in this disclosure, unless there is an explicit reference to a chroma block, a "current block" may refer to 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 expressed by explicitly including the reference to a luma component block, such as a "luma block" or a "current luma block." Furthermore, the chroma component block of the current block may be expressed by explicitly including the reference to a chroma component block, such as a "chroma block" or a "current chroma block."
[0036] In the present disclosure, " / " and "," can be interpreted as "and / or." For example, "A / B" and "A, B" can be interpreted as "A and / or B." Also, "A / B / C" and "A, B, C" can mean "at least one of A, B, and / or C."
[0037] In this disclosure, "or" can be interpreted as "and / or." For example, "A or B" can mean 1) only "A," 2) only "B," or 3) "A and B." Alternatively, in this disclosure, "or" can mean "additionally or alternatively."
[0038] Video Coding System Overview
[0039] FIG. 1 is a diagram illustrating a video coding system in accordance with this disclosure.
[0040] A video coding system according to an embodiment may include an encoding device 10 and a decoding device 20. The encoding device 10 may transmit encoded video and / or image information or data to the decoding device 20 in a file or streaming format via a digital storage medium or a network.
[0041] The encoding device 10 according to an embodiment may include a video source generating unit 11, an encoding unit 12, and a transmitting unit 13. The decoding device 20 according to an embodiment may include a receiving unit 21, a decoding unit 22, and a rendering unit 23. The encoding unit 12 may be referred to as a video / image encoding unit, and the decoding unit 22 may be referred to as a video / image decoding unit. The transmitting unit 13 may be included in the encoding unit 12. The receiving unit 21 may be included in the decoding unit 22. The rendering unit 23 may include a display unit, which may be configured as a separate device or an external component.
[0042] The video source generating unit 11 can obtain videos / images through a process of capturing, synthesizing, or generating videos / images. The video source generating unit 11 can include a video / image capture device and / or a video / image generation device. The video / image capture device can include, for example, one or more cameras, a video / image archive containing previously captured videos / images, etc. The video / image generation device can include, for example, a computer, a tablet, a smartphone, etc., and can (electronically) generate videos / images. For example, a virtual video / image can be generated through a computer, etc., in which case the video / image capture process can be replaced by a process in which related data is generated.
[0043] The encoder 12 may encode the input video / image. The encoder 12 may perform a series of steps such as prediction, transformation, quantization, etc. for compression and encoding efficiency. The encoder 12 may output the encoded data (encoded video / image information) in a bitstream format.
[0044] The transmitting unit 13 may transmit the encoded video / image information or data output in a bitstream format to the receiving unit 21 of the decoding device 20 via a digital storage medium or a network in a file or streaming format. The digital storage medium may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. The transmitting unit 13 may include an element for generating a media file via a predetermined file format and may include an element for transmitting via a broadcasting / communication network. The receiving unit 21 may extract / receive the bitstream from the storage medium or network and transmit it to the decoding unit 22.
[0045] The decoding unit 22 can decode the video / image by performing a series of steps such as inverse quantization, inverse transformation, and prediction corresponding to the operations of the encoding unit 12.
[0046] The rendering unit 23 can render the decoded video / images. The rendered video / images can be displayed via a display unit.
[0047] Overview of the image encoding device
[0048] FIG. 2 is a diagram illustrating an image encoding device to which an embodiment of the present disclosure can be applied.
[0049] As shown in Fig. 2, the image coding device 100 may include an image division unit 110, a subtraction unit 115, a transformation unit 120, a quantization unit 130, an inverse quantization unit 140, an inverse transformation unit 150, an addition unit 155, a filtering unit 160, a memory 170, an inter prediction unit 180, an intra prediction unit 185, and an entropy coding unit 190. The inter prediction unit 180 and the intra prediction unit 185 may be collectively referred to as a "prediction unit." The transformation unit 120, the quantization unit 130, the inverse quantization unit 140, and the inverse transformation unit 150 may be included in a residual processing unit. The residual processing unit may further include a subtraction unit 115.
[0050] All or at least some of the components constituting the image encoding device 100 may be realized by a single hardware component (e.g., an encoder or a processor) depending on the embodiment. Also, the memory 170 may include a decoded picture buffer (DPB) and may be realized by a digital storage medium.
[0051] The image division unit 110 may divide an input image (or picture, frame) input to the image encoding device 100 into one or more processing units. As an example, the processing units may be called coding units (CUs). The coding units may be obtained by recursively dividing a coding tree unit (CTU) or a largest coding unit (LCU) according to a QT / BT / TT (Quad-tree / Binary-tree / Ternal-tree) structure. For example, one coding unit may be divided into a plurality of coding units of a deeper depth based on a quad-tree structure, a binary-tree structure, and / or a ternary-tree structure. For dividing the coding units, a quad-tree structure may be applied first, and a binary-tree structure and / or a ternary-tree structure may be applied later. A coding procedure according to the present disclosure may be performed based on a final coding unit that is not further divided. The maximum coding unit may be used as the final coding unit, and a lower depth coding unit obtained by dividing the maximum coding unit may be used as the final coding unit. Here, the coding procedure may include procedures such as prediction, transformation, and / or restoration, which will be described later. As another example, a processing unit of the coding procedure may be a prediction unit (PU) or a transform unit (TU). The prediction unit and the transform unit may be divided or partitioned from the final coding unit, respectively. The prediction unit may be a unit of sample prediction, and the transform unit may be a unit for deriving transform coefficients and / or a unit for deriving a residual signal from the transform coefficients.
[0052] The prediction unit (inter prediction unit 180 or intra prediction unit 185) may perform prediction on a block to be processed (current block) and generate a predicted block including prediction samples for the current block. The prediction unit may determine whether intra prediction or inter prediction is applied in units of a current block or a CU. The prediction unit may generate various information related to prediction of the current block and transmit it to the entropy encoding unit 190. The information related to prediction may be encoded by the entropy encoding unit 190 and output in a bitstream format.
[0053] The intra prediction unit 185 may predict the current block by referring to samples in the current picture. The referenced samples may be located in the neighborhood of the current block or may be located away from the current block according to an intra prediction mode and / or an intra prediction technique. The intra prediction mode may include a plurality of non-directional modes and a plurality of directional modes. The non-directional mode may include, for example, a DC mode and a planar mode. The directional mode may include, for example, 33 directional prediction modes or 65 directional prediction modes depending on the fineness of the prediction direction. However, this is merely an example, and more or less directional prediction modes may be used depending on the setting. The intra prediction unit 185 may also determine a prediction mode to be applied to the current block using prediction modes applied to neighboring blocks.
[0054] The inter prediction unit 180 may derive a predicted block for a current block based on a reference block (reference sample array) identified 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 a block, a sub-block, or a sample based on the correlation of motion information between a neighboring block and a current block. The motion information may include a motion vector and a reference picture index. The motion information may further include inter prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.) information. In the case of inter prediction, the neighboring block may include a spatial neighboring block present in the current picture and a temporal neighboring block 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 from each other. The temporal neighboring block may be called a collocated reference block, a collocated CU (colCU), etc. The reference picture including the temporal neighboring block may be called a collocated picture (colPic). For example, the inter prediction unit 180 may generate information indicating which candidate is used to derive a motion vector and / or a reference picture index of the current block by forming a motion information candidate list based on neighboring blocks. Inter prediction may be performed based on various prediction modes, and for example, in the case of a skip mode and a merge mode, the inter prediction unit 180 may use motion information of neighboring blocks as motion information of the current block. In the case of the skip mode, unlike the merge mode, a residual signal may not be transmitted.In the case of a motion vector prediction (MVP) mode, the motion vector of the current block can be signaled by using the motion vector of a neighboring block as a motion vector predictor and encoding a motion vector difference and an indicator for the motion vector predictor. The motion vector difference can mean the difference between the motion vector of the current block and the motion vector predictor.
[0055] The prediction unit may generate a prediction signal based on various prediction methods and / or prediction techniques, which will be described later. For example, the prediction unit may apply intra prediction or inter prediction for prediction of the current block, and may simultaneously apply intra prediction and inter prediction. A prediction method that simultaneously applies intra prediction and inter prediction for prediction of the current block may be called combined inter and intra prediction (CIIP). The prediction unit may also perform intra block copy (IBC) for prediction of the current block. Intra block copy can be used for content image / video coding such as games, for example, as in screen content coding (SCC). IBC is a method of predicting a current block using an already restored reference block in a current picture that is located a predetermined distance away from the current block. When IBC is applied, the position of the reference block in the current picture may be coded as a vector (block vector) corresponding to the predetermined distance. IBC is basically performed in the current picture, but may be performed similarly to inter prediction in that a reference block is derived in the current picture. That is, the IBC may use at least one of the inter prediction techniques described in this disclosure.
[0056] The prediction signal generated by the prediction unit may be used to generate a restored signal or a residual signal. The subtraction unit 115 may subtract the prediction signal (predicted block, prediction sample array) output from the prediction unit from the input image signal (original block, original sample array) to generate a residual signal (residual block, residual sample array). The generated residual signal may be transmitted to the conversion unit 120.
[0057] The transform unit 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-Loeve transform (KLT), a graph-based transform (GBT), or a conditionally non-linear transform (CNT). Here, the GBT refers to a transform obtained from a graph when the relationship information between pixels is expressed as a graph. The CNT refers to a transform obtained based on a predicted signal generated using all previously reconstructed pixels. The transform process may be applied to pixel blocks having the same square size, or may be applied to non-square, variable-sized blocks.
[0058] The quantization unit 130 may quantize the transform coefficients and transmit the quantized transform coefficients to the entropy coding unit 190. The entropy coding unit 190 may code the quantized signal (information on the quantized transform coefficients) and output the coded signal in a bitstream format. The information on the quantized transform coefficients may be referred to as residual information. The quantization unit 130 may rearrange the quantized transform coefficients in a block format into a one-dimensional vector format based on a coefficient scan order, and may generate information on the quantized transform coefficients based on the quantized transform coefficients in the one-dimensional vector format.
[0059] The entropy coding unit 190 may perform various coding methods, such as exponential Golomb, context-adaptive variable length coding (CAVLC), and context-adaptive binary arithmetic coding (CABAC). The entropy coding unit 190 may also code information required for video / image restoration (e.g., values of syntax elements, etc.) together or separately in addition to the quantized transform coefficients. The coded information (e.g., coded video / image information) may be transmitted or stored in a network abstraction layer (NAL) unit unit in a bitstream format. The video / image information may further include information on various parameter sets, such as an adaptation parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). The video / image information may further include general constraint information. The signaling information, transmitted information and / or syntax elements referred to in this disclosure may be encoded through the above-mentioned encoding procedures and included in the bitstream.
[0060] The bitstream may be transmitted via a network or may be stored in a digital storage medium. Here, the network may include a broadcasting network and / or a communication network, and the digital storage medium may include various storage media such as a USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. A transmitting unit (not shown) for transmitting the signal output from the entropy encoding unit 190 and / or a storing unit (not shown) for storing the signal may be provided as an internal / external element of the image encoding device 100, or the transmitting unit may be provided as a component of the entropy encoding unit 190.
[0061] The quantized transform coefficients output from the quantization unit 130 can be used to generate a residual signal. For example, the quantized transform coefficients are subjected to inverse quantization and inverse transformation via the inverse quantization unit 140 and the inverse transformation unit 150, so that a residual signal (residual block or residual sample) can be restored.
[0062] The adder 155 may generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array) by adding the reconstructed residual signal to a prediction signal output from the inter prediction unit 180 or the intra prediction unit 185. When there is no residual for the current block to be processed, such as when a skip mode is applied, a predicted block may be used as a reconstructed block. The adder 155 may be referred to as a reconstruction unit or a reconstructed block generation unit. The generated reconstructed signal may be used for intra prediction of the next current block to be processed in the current picture, and may also be used for inter prediction of the next picture after filtering as described below.
[0063] The filtering unit 160 may apply filtering to the reconstructed signal to improve subjective / objective image quality. For example, the filtering unit 160 may apply various filtering methods to the reconstructed picture to generate a modified reconstructed picture, and may store the modified reconstructed picture in the memory 170, specifically, in the DPB of the memory 170. The various filtering methods may include, for example, deblocking filtering, sample adaptive offset, an adaptive loop filter, a bilateral filter, and the like. The filtering unit 160 may generate various information related to filtering, as will be described later in the description of each filtering method, and transmit the information to the entropy coding unit 190. The information related to filtering may be coded by the entropy coding unit 190 and output in a bitstream format.
[0064] The modified reconstructed picture transmitted to the memory 170 may be used as a reference picture in the inter prediction unit 180. When inter prediction is applied through this, the image encoding device 100 may avoid a prediction mismatch between the image encoding device 100 and the image decoding device, and may also improve encoding efficiency.
[0065] The DPB in the memory 170 may store modified reconstructed pictures to be used as reference pictures in the inter prediction unit 180. The memory 170 may store motion information of blocks from which motion information in the current picture is derived (or coded) and / or motion information of already reconstructed intra-picture blocks. The stored motion information may be transmitted to the inter prediction unit 180 to be used as motion information of spatial surrounding blocks or motion information of temporal surrounding blocks. The memory 170 may store reconstructed samples of reconstructed blocks in the current picture and transmit them to the intra prediction unit 185.
[0066] Overview of the image decoding device
[0067] FIG. 3 is a diagram illustrating an image decoding device to which an embodiment of the present disclosure can be applied.
[0068] 3, the image decoding device 200 may include an entropy decoding unit 210, an inverse quantization unit 220, an inverse transform unit 230, an adder 235, a filtering unit 240, a memory 250, an inter prediction unit 260, and an intra prediction unit 265. The inter prediction unit 260 and the intra prediction unit 265 may be collectively referred to as a "prediction unit." The inverse quantization unit 220 and the inverse transform unit 230 may be included in a residual processing unit.
[0069] All or at least some of the components constituting the image decoding device 200 may be realized by one hardware component (e.g., a decoder or a processor) depending on the embodiment. Also, the memory 170 may include a DPB and may be realized by a digital storage medium.
[0070] The image decoding device 200, which receives a bitstream including video / image information, can reconstruct an image by executing a process corresponding to the process performed by the image encoding device 100 of Fig. 2. For example, the image decoding device 200 can perform decoding using a processing unit applied in the image encoding device. Thus, the processing unit for decoding can be, for example, a coding unit. The coding unit can be obtained by dividing a coding tree unit or a maximum coding unit. Then, the reconstructed image signal decoded and output by the image decoding device 200 can be reproduced by a reproduction device (not shown).
[0071] The image decoding apparatus 200 may receive a signal output from the image encoding apparatus of FIG. 2 in the form of a bitstream. The received signal may be decoded via the entropy decoding unit 210. For example, the entropy decoding unit 210 may derive information (e.g., video / image information) required for image restoration (or picture restoration) by parsing the bitstream. The video / image information may further include information on various parameter sets such as an adaptation 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 further include general constraint information. The image decoding apparatus may further use information on the parameter set and / or the general constraint information to decode an image. The signaling information, received information, and / or syntax elements referred to in the present disclosure may be obtained from the bitstream by being decoded via the decoding procedure. For example, the entropy decoding unit 210 may decode information in a bitstream based on a coding method such as exponential Golomb coding, CAVLC, or CABAC, and output values of syntax elements required for image restoration and quantized values of transform coefficients related to the residual. More specifically, the CABAC entropy decoding method may receive bins corresponding to each syntax element from the bitstream, determine a context model using syntax element information to be decoded and decoded information of neighboring blocks and a block to be decoded, or information of a symbol / bin decoded in a previous step, predict the occurrence probability of the bin based on the determined context model, and perform arithmetic decoding of the bin to generate a symbol corresponding to the value of each syntax element. In this case, the CABAC entropy decoding method may update the context model using information of the decoded symbol / bin for the context model of the next symbol / bin after determining the context model.Among the information decoded by the entropy decoding unit 210, information related to prediction is provided to a prediction unit (inter prediction unit 260 and intra prediction unit 265), and residual values entropy-decoded by the entropy decoding unit 210, i.e., quantized transform coefficients and related parameter information, may be input to the inverse quantization unit 220. Also, among the information decoded by the entropy decoding unit 210, information related to filtering may be provided to the filtering unit 240. Meanwhile, a receiving unit (not shown) for receiving a signal output from the image encoding device may be further provided as an internal / external element of the image decoding device 200, or the receiving unit may be provided as a component of the entropy decoding unit 210.
[0072] Meanwhile, the image decoding device according to the present disclosure may be called a video / image / picture decoding device. The image decoding device may include an information decoder (video / image / picture information decoder) and / or a sample decoder (video / image / picture sample decoder). The information decoder may include an entropy decoding unit 210, and the sample decoder may include at least one of an inverse quantization unit 220, an inverse transform unit 230, an adder 235, a filtering unit 240, a memory 250, an inter prediction unit 260, and an intra prediction unit 265.
[0073] The inverse quantization unit 220 may inverse quantize the quantized transform coefficients to output transform coefficients. The inverse quantization unit 220 may rearrange the quantized transform coefficients in a two-dimensional block format. In this case, the rearrangement may be performed based on a coefficient scan order performed in the image encoding device. The inverse quantization unit 220 may perform inverse quantization on the quantized transform coefficients using a quantization parameter (e.g., quantization step size information) to obtain transform coefficients.
[0074] The inverse transform unit 230 can inversely transform the transform coefficients to obtain a residual signal (residual block, residual sample array).
[0075] The prediction unit may perform prediction on a current block and generate a predicted block including a prediction sample for the current block. The prediction unit may determine whether intra prediction or inter prediction is applied to the current block based on the prediction information output from the entropy decoding unit 210, and may determine a specific intra / inter prediction mode (prediction technique).
[0076] The prediction unit can generate a prediction signal based on various prediction methods (techniques) described below, as has been described in the explanation of the prediction unit of the image encoding device 100.
[0077] 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 may be similarly applied to the intra prediction unit 265.
[0078] The inter prediction unit 260 may derive a predicted block for the current block based on a reference block (reference sample array) identified 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 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 further include inter prediction direction (L0 prediction, L1 prediction, Bi 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. For example, the inter prediction unit 260 may configure a motion information candidate list based on the neighboring blocks, and derive a motion vector and / or a reference picture index for the current block based on the received candidate selection information. Inter prediction may be performed based on various prediction modes (techniques), and the prediction information may include information indicating a mode (technique) of inter prediction for the current block.
[0079] The adder 235 may generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array) by adding the acquired residual signal to a prediction signal (predicted block, predicted sample array) output from a prediction unit (including the inter prediction unit 260 and / or the intra prediction unit 265). When there is no residual for the current block, such as when a skip mode is applied, the predicted block can be used as the reconstructed block. The description of the adder 155 may also be applied to the adder 235. The adder 235 may also be referred to as a reconstruction unit or a reconstructed block generator. The generated reconstructed signal may be used for intra prediction of the next current block in the current picture, and may also be used for inter prediction of the next picture via filtering, as described below.
[0080] The filtering unit 240 may apply filtering to the reconstructed signal to improve subjective / objective image quality. For example, the filtering unit 240 may apply various filtering methods to the reconstructed picture to generate a modified reconstructed picture, and may 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, an adaptive loop filter, a bilateral filter, etc.
[0081] The (modified) reconstructed picture stored in the DPB of the memory 250 may be used as a reference picture in the inter prediction unit 260. The memory 250 may store motion information of a block from which motion information in the current picture is derived (or decoded) and / or motion information of a block in an already reconstructed picture. The stored motion information may be transmitted to the inter prediction unit 260 to be used as motion information of a spatial surrounding block or motion information of a temporal surrounding block. The memory 250 may store a reconstructed sample of a reconstructed block in the current picture and transmit it to the intra prediction unit 265.
[0082] In this specification, the embodiments described for the filtering unit 160, inter prediction unit 180 and intra prediction unit 185 of the image encoding device 100 can also be applied in a similar or corresponding manner to the filtering unit 240, inter prediction unit 260 and intra prediction unit 265 of the image decoding device 200, respectively.
[0083] Inter Prediction Overview
[0084] The image encoding / decoding apparatus may perform inter prediction on a block-by-block basis to derive a prediction sample. Inter prediction may refer to a prediction technique derived in a manner dependent on data elements of pictures other than the current picture. When inter prediction is applied to a current block, a prediction block for the current block may be derived based on a reference block identified by a motion vector on a reference picture.
[0085] At this time, in order to reduce the amount of motion information transmitted in the inter prediction mode, motion information of the current block may be derived based on correlation of motion information between neighboring blocks and the current block, and motion information may be derived in units of blocks, sub-blocks, or samples. At this time, the motion information may include a motion vector and a reference picture index. The motion information may further include inter prediction type information. Here, the inter prediction type information may mean direction information of inter prediction. The inter prediction type information may indicate that the current block is predicted using any one of L0 prediction, L1 prediction, and Bi prediction.
[0086] When inter prediction is applied to a 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 a reference picture. In this case, a reference picture including a reference block for the current block and a reference picture including the temporal neighboring blocks may be the same or different. The temporal neighboring blocks may be called collocated reference blocks, collocated coding units (colCUs), etc. The reference picture including the temporal neighboring blocks may be called a collocated picture (colPic).
[0087] On the other hand, a motion information candidate list can be constructed based on neighboring blocks of the current block, and at this time, flag or index information indicating which candidate is used to derive a motion vector and / or reference picture index for the current block can be signaled.
[0088] The motion information may include L0 motion information and / or L1 motion information based on an inter prediction type. A motion vector in an L0 direction may be defined as an L0 motion vector or MVL0, and a motion vector in an L1 direction may be defined as an L1 motion vector or MVL1. A prediction based on an L0 motion vector may be defined as an L0 prediction, a prediction based on an L1 motion vector may be defined as an L1 prediction, and a prediction based on both the L0 motion vector and the L1 motion vector may be defined as a bi-prediction. Here, an L0 motion vector may mean a motion vector associated with a reference picture list L0, and an L1 motion vector may mean a motion vector associated with a reference picture list L1.
[0089] The reference picture list L0 may include pictures earlier in the output order than the current picture as reference pictures, and the reference picture list L1 may include pictures later in the output order than the current picture. In this case, the earlier pictures may be defined as forward (reference) pictures, and the later pictures may be defined as backward (reference) pictures. Meanwhile, the reference picture list L0 may further include pictures later in the output order than the current picture. In this case, the earlier pictures may be indexed first in the reference picture list L0, and the later pictures may be indexed next. The reference picture list L1 may further include pictures earlier in the output order than the current picture. In this case, the later pictures may be indexed first in the reference picture list L1, and the earlier pictures may be indexed next. Here, the output order may correspond to a picture order count (POC) order.
[0090] FIG. 4 is a flow chart diagram illustrating a video / image coding method based on inter prediction.
[0091] FIG. 5 is a diagram illustrating an example configuration of the inter prediction unit 180 according to the present disclosure.
[0092] The encoding method of FIG. 4 may be performed by the image encoding apparatus of FIG. 2. Specifically, step S410 may be performed by the inter prediction unit 180, and step S420 may be performed by the residual processing unit. Specifically, step S420 may be performed by the subtraction unit 115. Step S430 may be performed by the entropy encoding unit 190. The prediction information of step S430 may be derived by the inter prediction unit 180, and the residual information of step S430 may be derived by the residual processing unit. The residual information may include information on quantized transform coefficients for the residual samples. As described above, the residual samples may be derived as transform coefficients via the transform unit 120 of the image encoding apparatus, and the transform coefficients may be derived as quantized transform coefficients via the quantization unit 130. The information on the quantized transform coefficients may be coded in the entropy encoding unit 190 through a residual coding procedure.
[0093] The image encoding apparatus may perform inter prediction on a current block (S410). The image encoding apparatus may derive an inter prediction mode and motion information of a current block, and generate a prediction sample of the current block. Here, the steps of determining an inter prediction mode, deriving motion information, and generating a prediction sample may be performed simultaneously, or one step may be performed prior to the other steps. For example, as shown in FIG. 5, an inter prediction unit 180 of the image encoding apparatus 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 a prediction mode for the current block, the motion information derivation unit 182 may derive motion information of the current block, and the prediction sample derivation unit 183 may derive a prediction sample of the current block. For example, the inter prediction unit 180 of the image encoding apparatus may search for a block similar to the current block within a certain area (search area) of a reference picture through motion estimation, and derive a reference block whose difference with the current block is minimum or equal to or less than a certain criterion. 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 a position difference between the reference block and the current block. The image encoding apparatus may determine a mode to be applied to the current block from among various prediction modes. The image encoding apparatus may compare rate-distortion (RD) costs for the various inter prediction modes and determine an optimal prediction mode for the current block. However, the method in which the image encoding apparatus determines the inter prediction mode for the current block is not limited to the above example, and various methods may be used.
[0094] For example, the inter prediction mode for the current block can be determined to be at least one of merge mode, skip mode, Motion Vector Prediction mode (MVP mode), Symmetric Motion Vector Difference (SMVD mode), affine mode, subblock-based merge mode, Adaptive Motion Vector Resolution mode (AMVR mode), History-based Motion Vector Predictor mode (HMVP mode), Pair-wise average merge mode, Merge mode with Motion Vector Differences mode (MMVD mode), Decoder side Motion Vector Refinement mode (DMVR mode), Combined Inter and Intra Prediction mode (CIIP mode), and Geometric Partitioning mode (GPM).
[0095] For example, when a skip mode or a merge mode is applied to a current block, the image encoding apparatus may derive merge candidates from neighboring blocks of the current block and construct a merge candidate list using the induced merge candidates. The image encoding apparatus may also derive a reference block whose difference from the current block is minimum or equal to or less than a certain criterion among reference blocks indicated by 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 apparatus. Motion information of the current block may be derived using motion information of the selected merge candidate.
[0096] As another example, when an MVP mode is applied to the current block, the image encoding apparatus may derive motion vector predictor (MVP) candidates from neighboring blocks of the current block, and may construct an MVP candidate list using the induced MVP candidates. Also, the image encoding apparatus may use a motion vector of an MVP candidate selected from among the MVP candidates included in the MVP candidate list as an MVP of the current block. In this case, for example, a motion vector indicating a reference block derived by the above-mentioned motion estimation may be used as the motion vector of the current block, and an MVP candidate having a motion vector with a minimum difference from the motion vector of the current block among the MVP candidates may become the selected MVP candidate. A motion vector difference (MVD), which is 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 regarding the MVD may be signaled to the image decoding apparatus. Also, when an MVP mode is applied, a value of the reference picture index may be configured as reference picture index information and separately signaled to the image decoding apparatus.
[0097] The image encoding apparatus may derive a residual sample based on the predicted sample (S420). The image encoding apparatus may derive the residual sample by comparing an original sample of the current block with the predicted sample. For example, the residual sample may be derived by subtracting a corresponding predicted sample from an original sample.
[0098] The image encoding apparatus may encode image information including prediction information and residual information (S430). The image encoding apparatus may output the encoded image information in a bitstream format. The prediction information may include prediction mode information (e.g., a skip flag, a merge flag, or a mode index) and information on motion information, which are information related to the prediction procedure. The skip flag of the prediction mode information is information indicating whether a skip mode is applied to the current block, and the merge flag is information indicating whether a merge mode is applied to the current block. Alternatively, the prediction mode information may be information indicating one of a plurality of prediction modes, such as a mode index. If the skip flag and the merge flag are each 0, it may be determined that the MVP mode is applied to the current block. The information on the motion information may include candidate selection information (e.g., a merge index, an MVP flag, or an MVP index) which is information for deriving a motion vector. The merge index of the candidate selection information may be signaled when a merge mode is applied to the current block, and may be information for selecting one of merge candidates included in a merge candidate list. Among the candidate selection information, the MVP flag or 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 included in the MVP candidate list. Specifically, the MVP flag may be signaled using a syntax element mvp_l0_flag or mvp_l1_flag. In addition, the information on the motion information may include the above-mentioned information on the MVD and / or reference picture index information. In addition, the information on the motion information may include information indicating whether L0 prediction, L1 prediction, or Bi-prediction is applied. The residual information is information on the residual sample.The residual information may include information regarding quantized transform coefficients for the residual samples.
[0099] The output bitstream may be stored on a (digital) storage medium and transmitted to the image decoding device, or may be transmitted to the image decoding device via a network.
[0100] Meanwhile, as described above, the image coding apparatus can generate a reconstructed picture (a picture including reconstructed samples and reconstructed blocks) based on the reference samples and the residual samples. This is because the image coding apparatus derives the same prediction result as that performed by the image decoding apparatus, thereby improving coding efficiency. Therefore, the image coding apparatus can store the reconstructed picture (or reconstructed samples, reconstructed blocks) in a memory and use it as a picture for inter prediction. As described above, an in-loop filtering procedure can be further applied to the reconstructed picture.
[0101] FIG. 6 is a flow chart illustrating a video / image decoding method based on inter prediction.
[0102] FIG. 7 is a diagram illustrating an example configuration of the inter prediction unit 260 according to the present disclosure.
[0103] The image decoding apparatus may perform operations corresponding to those performed by the image encoding apparatus, and may perform prediction for a current block based on received prediction information to derive predicted samples.
[0104] The decoding method of FIG. 6 may be performed by the image decoding apparatus of FIG. 3. Steps S610 to S630 may be performed by the inter prediction unit 260, and the prediction information of step S610 and the residual information of step S640 may be obtained from a bitstream by the entropy decoding unit 210. The residual processing unit of the image decoding apparatus may derive a residual sample for a current block based on the residual information (S640). Specifically, the inverse quantization unit 220 of the residual processing unit may derive a transform coefficient by performing inverse quantization based on the quantized transform coefficient derived based on the residual information, and the inverse transform unit 230 of the residual processing unit may derive a residual sample for the current block by performing inverse transform on the transform coefficient. Step S650 may be performed by the adder 235 or a reconstruction unit.
[0105] Specifically, the image decoding apparatus may determine a prediction mode for 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.
[0106] For example, it may be determined whether the skip mode is applied to the current block based on the skip flag. Also, it may be determined whether the merge mode or the MVP mode is applied to the current block based on the merge flag. Or, it may select one of various inter prediction mode candidates based on the mode index. The inter prediction mode candidates may include skip mode, merge mode, and / or MVP mode, or may include various inter prediction modes described below.
[0107] The image decoding apparatus may derive motion information of the current block based on the determined inter prediction mode (S620). For example, when a skip mode or a merge mode is applied to the current block, the image decoding apparatus may form a merge candidate list (described later) and select one of the merge candidates included in the merge candidate list. The selection may be performed based on the candidate selection information (merge index) described above. The motion information of the current block may be derived using motion information of the selected merge candidate. For example, the motion information of the selected merge candidate may be used as motion information of the current block.
[0108] As another example, when the MVP mode is applied to the current block, the image decoding apparatus may construct an MVP candidate list, and may use a motion vector of an MVP candidate selected from among 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 information on the MVD, and the motion vector of the current block may be derived based on the MVP of the current block and the MVD. Also, the reference picture index of the current block may be derived based on the reference picture index information. A picture pointed to by the reference picture index in a reference picture list for the current block may be derived as a reference picture referenced for inter prediction of the current block.
[0109] The image decoding apparatus may generate a prediction sample for the current block based on the motion information of the current block (S630). In this case, the reference picture may be derived based on a reference picture index of the current block, and the prediction sample of the current block may be derived using a sample of a reference block to which the motion vector of the current block points on the reference picture. Depending on the case, a prediction sample filtering procedure may be further performed on all or some of the prediction samples of the current block.
[0110] For example, as shown in Fig. 7, the inter prediction unit 260 of the image decoding apparatus may include a prediction mode determination unit 261, a motion information derivation unit 262, and a prediction sample derivation unit 263. The inter prediction unit 260 of the image decoding apparatus may determine a prediction mode for the current block based on prediction mode information received by the prediction mode determination unit 261, derive motion information (such as a motion vector and / or a reference picture index) of the current block based on information on the motion information received by the motion information derivation unit 262, and derive a prediction sample of the current block by the prediction sample derivation unit 263.
[0111] The image decoding apparatus may generate a residual sample for the current block based on the received residual information (S640). The image decoding apparatus may generate a reconstructed sample for the current block based on the predicted sample and the residual sample, and generate a reconstructed picture based on the reconstructed sample (S650). Thereafter, an in-loop filtering procedure may be further applied to the reconstructed picture, as described above.
[0112] As described above, the inter prediction procedure may include an inter prediction mode determination step, a motion information derivation step according to the determined prediction mode, and a prediction execution step (prediction sample generation) step based on the derived motion information. The inter prediction procedure may be performed in an image encoding device and an image decoding device, as described above.
[0113] The motion information derivation step according to the prediction mode will be described in more detail below.
[0114] As described above, inter prediction may be performed using motion information of a current block. The image coding apparatus may derive optimal motion information for a current block through a motion estimation procedure. For example, the image coding apparatus may search for a similar reference block with high correlation using an original block in an original picture for the current block in a fractional pixel unit within a determined search range in the reference picture, thereby deriving motion information. The similarity of the blocks may be calculated based on a sum of absolute differences (SAD) between the current block and the reference block. In this case, the motion information may be derived based on a reference block with the smallest SAD in the search range. The derived motion information may be signaled to the image decoding apparatus by various methods based on the inter prediction mode.
[0115] When a merge mode is applied to a current block, the motion information of the current block is not directly transmitted, but is derived using the motion information of the neighboring blocks. Thus, the motion information of the current prediction block can be indicated by transmitting 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 this disclosure, since the current block is a unit of prediction execution, the current block can be used in the same sense as the current prediction block, and the neighboring block can be used in the same sense as the neighboring prediction block.
[0116] The image encoding apparatus may search for a merge candidate block used to derive motion information of a current block to perform a merge mode. For example, the number of merge candidate blocks may be up to, but is not limited to, 5. The maximum number of merge candidate blocks may be transmitted from a slice header or a tile group header, but is not limited to this. After finding the merge candidate blocks, the image encoding apparatus may generate a merge candidate list, and may select a merge candidate block having the smallest RD cost as a final merge candidate block.
[0117] The present disclosure provides various embodiments for the merge candidate blocks constituting the 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.
[0118] FIG. 8 is a diagram illustrating neighboring blocks used as spatial merging candidates.
[0119] FIG. 9 is a schematic diagram illustrating a merge candidate list construction method according to an example of the present disclosure.
[0120] The image encoding device / image decoding device may insert the derived spatial merge candidates into a merge candidate list (S910) by searching the spatial peripheral blocks of the current block. The spatial peripheral blocks may include a lower left corner peripheral block A0, a left peripheral block A1, a right upper corner peripheral block B0, an upper peripheral block B1, and an upper left corner peripheral block B2 of the current block, as shown in FIG. 8. However, this is merely an example, and additional peripheral blocks such as a right peripheral block, a lower peripheral block, and a lower right peripheral block may be used as the spatial peripheral blocks in addition to the spatial peripheral blocks described above. The image encoding device / image decoding device may search the spatial peripheral blocks based on a priority order to detect available blocks and derive motion information of the detected blocks as the spatial merge candidates. For example, the image encoding device / image decoding device may search the five blocks shown in FIG. 8 in the order of A1, B1, B0, A0, and B2, and sequentially index the available candidates to construct a merge candidate list.
[0121] The image coding apparatus / image decoding apparatus may search for temporal peripheral blocks of the current block and insert the derived temporal merge candidates into the merge candidate list (S920). The temporal peripheral blocks may be located on a reference picture that is a different picture from the current picture in which the current block is located. The reference picture in which the temporal peripheral blocks are located may be called a collocated picture or a col picture. The temporal peripheral blocks may be searched in the order of a lower right corner peripheral block and a lower right center block of a co-located block with respect to the current block on the col picture. Meanwhile, when motion data compression is applied to reduce memory load, specific motion information may be stored as representative motion information for each certain storage unit for the col picture. In this case, it is not necessary to store motion information for all blocks in the certain storage unit, and thus a motion data compression effect can be obtained. In this case, the certain storage unit may be predetermined, for example, a 16×16 sample unit or an 8×8 sample unit, or size information for the certain storage unit may be signaled from the image coding apparatus to the image decoding apparatus. When the motion data compression is applied, the motion information of the temporal peripheral block can be replaced with the representative motion information of the certain storage unit in which the temporal peripheral block is located. In other words, in this case, from the viewpoint of implementation, the temporal merge candidate can be derived based on the motion information of the prediction block that covers the position arithmetically shifted left after arithmetically shifting a certain value based on the coordinates (upper left sample position) of the temporal peripheral block, rather than the prediction block located at the coordinates of the temporal peripheral block. For example, if the certain storage unit is 2 n ×2 nWhen it is in sample units, if the coordinates of the temporal neighboring block are (xTnb, yTnb), the motion information of the prediction block located at the corrected position ((xTnb>>n)<<n), (yTnb>>n)<<n)) can be used for the temporal merge candidate. Specifically, for example, when the fixed storage unit is 16×16 sample units, if the coordinates of the temporal neighboring block are (xTnb, yTnb), the motion information of the prediction block located at the corrected position ((xTnb>>4)<<4), (yTnb>>4)<<4)) can be used for the temporal merge candidate. Or, for example, when the fixed storage unit is 8×8 sample units, if the coordinates of the temporal neighboring block are (xTnb, yTnb), the motion information of the prediction block located at the corrected position ((xTnb>>3)<<3), (yTnb>>3)<<3)) can be used for the temporal merge candidate.
[0122] Referring to FIG. 9 again, the image encoding device / image decoding device can check whether the number of current merge candidates is smaller than the maximum number of merge candidates (S930). The maximum number of merge candidates can be predefined or signaled from the image encoding device to the image decoding device. For example, the image encoding device can generate information regarding the maximum number of merge candidates, encode it, and transmit it to the image decoding device in the form of a bit stream. When all of the maximum number of merge candidates are satisfied, the subsequent candidate addition process (S940) cannot be performed.
[0123] If it is determined in step S930 that the number of the current merge candidates is smaller than the maximum number of merge candidates, the image encoding / decoding apparatus may derive additional merge candidates based on a predetermined scheme and insert the additional merge candidates into the merge candidate list (S940). The additional merge candidates may include at least one of history based merge candidate(s), pair-wise average merge candidate(s), ATMVP, combined bi-predictive merge candidate (if the slice / tile group type of the current slice / tile group is type B), and / or zero vector merge candidate.
[0124] As a result of the check in step S930, if the number of the current merging candidates is not smaller than the maximum number of merging candidates, the image encoding device / image decoding device may end construction of the merging candidate list. In this case, the image encoding device may select an optimal merging candidate from among the merging candidates constituting the merging candidate list based on an RD cost, and may signal candidate selection information (e.g., a merge candidate index) indicating the selected merging candidate to the image decoding device. The image decoding device may select the optimal merging candidate based on the merging candidate list and the candidate selection information.
[0125] As described above, the motion information of the selected merging candidate may be used as the motion information of the current block, and a predicted sample of the current block may be derived based on the motion information of the current block. The image encoding apparatus may derive a residual sample of the current block based on the predicted sample, and may signal residual information regarding the residual sample to an image decoding apparatus. As described above, the image decoding apparatus may generate a reconstructed sample based on the residual sample derived based on the residual information and the predicted sample, and generate a reconstructed picture based on the reconstructed sample.
[0126] When a skip mode is applied to a current block, motion information of the current block can be derived in the same manner as when a merge mode is applied to the previous block. However, when the skip mode is applied, the residual signal for the block is omitted. Therefore, the predicted samples can be used immediately as reconstructed samples. The skip mode can be applied, for example, when the value of cu_skip_flag is 1.
[0127] When the MVP mode is applied to the current block, a motion vector predictor (mvp) candidate list can be generated using the motion vector of the restored spatial surrounding block (e.g., the surrounding block shown in FIG. 8) and / or the motion vector corresponding to the temporal surrounding block (or Col block). That is, the motion vector of the restored spatial surrounding block and / or the motion vector corresponding to the temporal surrounding block can be used as a motion vector predictor candidate of the current block. When bi-prediction is applied, an mvp candidate list for deriving L0 motion information and an mvp candidate list for deriving L1 motion information can be generated and used separately. Prediction information (or prediction information) for the current block can include candidate selection information (e.g., an MVP flag or an MVP index) indicating an optimal motion vector predictor candidate selected from the motion vector predictor candidates included in the mvp candidate list. In this case, the prediction unit can select a motion vector predictor of the current block from the motion vector predictor candidates included in the mvp candidate list using the candidate selection information. The prediction unit of the image encoding device may obtain a motion vector difference (MVD) between a motion vector of a current block and a motion vector predictor, and may encode the obtained motion vector difference and output the motion vector difference in a bitstream format. That is, the MVD may 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 a motion vector difference included in information related to the prediction, and derive the motion vector of the current block by adding the motion vector difference and the motion vector predictor. The prediction unit of the image decoding device may obtain or induce a reference picture index indicating a reference picture, etc., from information related to the prediction.
[0128] FIG. 10 is a diagram illustrating a motion vector predictor candidate list construction method according to an example of the present disclosure.
[0129] First, the spatial candidate blocks of the current block can be searched and available candidate blocks can be inserted into the MVP candidate list (S1010). Then, it is determined whether the MVP candidate list contains less than two MVP candidates (S1020). If there are two, the construction of the MVP candidate list can be completed.
[0130] In step S1020, if there are less than two spatial candidate blocks available, the temporal candidate blocks of the current block may be searched for and the available candidate blocks may be inserted into the MVP candidate list (S1030). If no temporal candidate blocks are available, the construction of the MVP candidate list may be completed by inserting a zero motion vector into the MVP candidate list (S1040).
[0131] On the other hand, when the MVP mode is applied, the reference picture index may be explicitly signaled. In this case, a picture index (refidxL0) for L0 prediction and a reference picture index (refidxL1) for L1 prediction may be signaled separately. For example, when the MVP mode is applied and bi-prediction (BI prediction) is applied, information on refidxL0 and information on refidxL1 may both be signaled.
[0132] As described above, when the MVP mode is applied, information on the MVD derived from the image coding apparatus may be signaled to the image decoding apparatus. The information on the MVD may include, for example, information indicating x, y components for the MVD absolute value and the sign. In this case, information indicating whether the MVD absolute value is greater than 0 and greater than 1, and the rest of the MVD may be signaled stepwise. For example, information indicating whether the MVD absolute value is greater than 1 may be signaled only when the value of flag information indicating whether the MVD absolute value is greater than 0 is 1.
[0133] Affine mode overview
[0134] Hereinafter, the affine mode, which is an example of an inter prediction mode, will be described in detail. In a conventional video encoding / decoding system, only one motion vector is used to represent motion information of a current block, but this method has a problem in that it only represents optimal motion information in block units, and cannot represent optimal motion information in pixel units. To solve this problem, an affine mode that defines motion information of a block in pixel units has been proposed. According to the affine mode, a pixel / sub-block unit motion vector of a block can be determined using two to four motion vectors associated with the current block.
[0135] Conventionally, motion information is expressed using a translation (or displacement) of pixel values, but in the affine mode, pixel-specific motion information can be expressed using at least one of translation, scaling, rotation, and shear. Among them, the affine mode in which pixel-specific motion information is expressed using a displacement, scaling, and rotation can be defined as a similarity or simplified affine mode. In the following description, the affine mode can mean a similarity or simplified affine mode.
[0136] Motion information in affine mode can be expressed using two or more CPMVs (Control Point Motion Vectors). A motion vector for a specific pixel position of the current block can be derived using the CPMV. In this case, a set of pixel-wise and / or sub-block-wise motion vectors of the current block can be defined as an Affine Motion Vector Field (Affine MVF).
[0137] FIG. 11 is a diagram for explaining a parameter model of the affine mode.
[0138] When an affine mode is applied to a current block, an affine MVF can be derived using either a 4-parameter model or a 6-parameter model. In this case, the 4-parameter model may mean a model type in which two CPMVs are used, and the 6-parameter model may mean a model type in which three CPMVs are used. Figures 11(a) and 11(b) show CPMVs used in the 4-parameter model and the 6-parameter model, respectively.
[0139] When the position of the current block is defined as (x, y), a motion vector according to a pixel position can be derived according to the following Equation 1 or Equation 2. For example, a motion vector according to a 4-parameter model can be derived according to Equation 1, and a motion vector according to a 6-parameter model can be derived according to Equation 2.
[0140]
number
[0141]
number
[0142] In formulas 1 and 2, mv0={mv 0x ,mv 0y} is the CPMV of the upper left corner position of the current block, and mv1={mv 1x ,mv 1y} is the CPMV of the upper right corner position of the current block, and mv2={mv 2x ,mv 2y} may be the CPMV of the bottom left position of the current block, where W and H correspond to the width and height of the current block, respectively, and mv={mv x ,mv y} can mean a motion vector for pixel position {x,y}.
[0143] In the encoding / decoding process, the affine MVF may be determined in pixel units and / or in predefined subblock units. When the affine MVF is determined in pixel units, a motion vector may be derived based on each pixel value. Meanwhile, when the affine MVF is determined in subblock units, a motion vector of the block may be derived based on a central pixel value of the subblock. The central pixel value may refer to a virtual pixel located at the center of the subblock, or may refer to a lower right pixel among four pixels located in the center. Also, the central pixel value may be a specific pixel within the subblock, which represents the subblock. In the present disclosure, a case will be described in which the affine MVF is determined in 4×4 subblock units. However, this is for convenience of explanation, and the size of the subblock may be variously changed.
[0144] That is, when affine prediction is available, the motion model applicable to the current block may include three, namely, a translational motion model, a 4-parameter affine motion model, and a 6-parameter affine motion model. Here, the translational motion model may indicate a model in which a conventional block-based motion vector is used, the 4-parameter affine motion model may indicate a model in which two CPMVs are used, and the 6-parameter affine motion model may indicate a model in which three CPMVs are used. The affine mode may be divided into detailed modes according to a method of encoding / decoding motion information. As an example, the affine mode may be subdivided into an affine MVP mode and an affine merge mode.
[0145] When the affine merge mode is applied to the current block, the CPMV can be derived from the neighboring blocks of the current block that are encoded / decoded in the affine mode. When at least one of the neighboring blocks of the current block is encoded / decoded in the affine mode, the affine merge mode can be applied to the current block. 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 of the coding parameters 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.
[0146] Meanwhile, in the case of affine merge in which MV is derived in subblock units, it may be called a subblock-based merging mode, which may be indicated by merge_subblock_flag having a second value (e.g., “1”). In this case, an affine merging candidate list, which will be described later, may also be called a subblock merging candidate list. In this case, the subblock merging candidate list may further include a candidate derived by sbTMVP, which will be described later. In this case, the candidate derived by sbTMVP may be used as a candidate for the 0th index of the subblock merging candidate list. In other words, the candidate derived by sbTMVP may be located before inherited affine candidates and constructed affine candidates, which will be described later, in the subblock merging candidate list.
[0147] As an example, an affine mode flag can be defined to indicate whether affine mode is applicable to the current block, which can be signaled at at least one level above the current block, such as a sequence, picture, slice, tile, tile group, brick, etc. For example, the affine mode flag can be named sps_affine_enabled_flag.
[0148] When the affine merge mode is applied, an affine merge candidate list can be configured for CPMV induction of the current block. In this case, the affine merge candidate list can include at least one of an inherited affine merge candidate, a combined affine merge candidate, and a zero merge candidate. The inherited affine merge candidate can mean a candidate derived using the CPMV of a neighboring block of the current block when the neighboring block is encoded / decoded in the affine mode. The combined affine merge candidate can mean a candidate whose CPMV is derived based on the motion vector of a neighboring block of each CP (Control Point). Meanwhile, the zero merge candidate can mean a candidate consisting of a CPMV of size 0. In the following description, a CP can mean a specific position of a block used to derive a CPMV. For example, a CP can be each vertex position of a block.
[0149] FIG. 12 is a diagram for explaining a method for generating an affine merge candidate list.
[0150] 12, affine merge candidates can be added to the affine merge candidate list in the following order: inheritance affine merge candidate (S1210), combined affine merge candidate (S1220), and zero merge candidate (S1230). The zero merge candidate can be added when the number of candidates in the candidate list does not satisfy the maximum number of candidates, even though all inheritance affine merge candidates and combined affine merge candidates have been added to the affine merge candidate list. In this case, the zero merge candidate can be added until the number of candidates in the affine merge candidate list satisfies the maximum number of candidates.
[0151] Overview of Subblock-based TMVP (sbTMVP) mode
[0152] Hereinafter, a sub-block-based TMVP mode, which is an example of an inter prediction mode, will be described in detail. According to the sub-block-based TMVP mode, a motion vector field (MVF) for a current block is derived, so that a motion vector can be derived in units of sub-blocks.
[0153] Unlike the conventional TMVP mode, which is performed in units of coding units, the coding unit to which the sub-block-based TMVP mode is applied can perform coding / decoding of motion vectors in units of sub-coding units. In addition, while the conventional TMVP mode derives a temporal motion vector from a collocated block, the sub-block-based TMVP mode can derive a motion vector field from a reference block indicated by a motion vector derive from a neighboring block of the current block. Hereinafter, the motion vector derive from the neighboring block can be referred to as a motion shift or representative motion vector of the current block.
[0154] FIG. 13 is a diagram for explaining peripheral blocks in the sub-block-based TMVP mode.
[0155] When the sub-block-based TMVP mode is applied to the current block, a neighboring block for determining a motion shift can be determined. As an example, scanning of neighboring blocks for determining a motion shift can be performed in the order of A1, B1, B0, and A0 blocks in FIG. 13. As another example, the neighboring block for determining a motion shift can be limited to a specific neighboring block of the current block. For example, the neighboring block for determining a motion shift can always be determined as the A1 block. If the neighboring block has a motion vector that references a col picture, the motion vector can be determined as a motion shift. The motion vector determined as a motion shift can also be referred to as a temporal motion vector. On the other hand, if the above-mentioned motion vector cannot be derived from the neighboring block, the motion shift can be set to (0,0).
[0156] FIG. 14 is a diagram for explaining a method of deriving a motion vector field according to the sub-block-based TMVP mode.
[0157] Next, a reference block on the collocated picture indicated by the motion shift can be determined. For example, by adding the motion shift to the coordinates of the current block, subblock-based motion information (motion vector, reference picture index) can be obtained from the col picture. In the example shown in FIG. 14, it is assumed that the motion shift is the motion vector of the A1 block. By applying the motion shift to the current block, a subblock (col subblock) in the col picture corresponding to each subblock constituting the current block can be identified. Then, motion information of each subblock of the current block can be derived using motion information of the corresponding subblock (col subblock) of the col picture. For example, motion information of the corresponding subblock can be obtained from the center position of the corresponding subblock. In this case, the center position can be the position of the lower right sample among the four samples located in the center of the corresponding subblock. If motion information of a specific subblock of the col block corresponding to the current block is not available, motion information of the central subblock of the col block can be determined as the motion information of the subblock. Once the motion information of the corresponding subblock is derived, it can be switched to the motion vector and reference picture index of the current subblock, similar to the above-mentioned TMVP process. That is, when a sub-block-based motion vector is derived, the motion vector may be scaled taking into account the POC of the reference picture of the reference block.
[0158] As described above, sub-block-based TMVP candidates for the current block can be derived using the motion vector field or motion information of the current block derived based on the sub-blocks.
[0159] Hereinafter, a merge candidate list composed of subblocks is defined as a subblock merge candidate list. The above-mentioned affine merge candidates and subblock-based TMVP candidates are merged to form a subblock merge candidate list.
[0160] Meanwhile, a subblock-based TMVP mode flag can be defined to indicate whether the subblock-based TMVP mode can be applied to the current block. This can be signaled at at least one level of the current block's upper level, such as a sequence, a picture, a slice, a tile, a tile group, or a brick. For example, the subblock-based TMVP mode flag can be named sps_sbtmvp_enabled_flag. If the subblock-based TMVP mode is applicable to the current block, a subblock-based TMVP candidate can be added first to the subblock merge candidate list. Then, an affine merge candidate can be added to the subblock merge candidate list. Meanwhile, the maximum number of candidates that can be included in the subblock merge candidate list can be signaled. As an example, the maximum number of candidates that can be included in the subblock merge candidate list can be 5.
[0161] The size of the sub-block used to derive the sub-block merging candidate list can be signaled or already set to M×N. For example, M×N can be 8×8. Thus, affine mode or sub-block based TMVP mode can be applied to the current block only if the size of the current block is 8×8 or larger.
[0162] Triangle partition mode (Triangle partition for inter prediction, TPM)
[0163] A triangular partitioning mode (TPM) can be used as an inter prediction mode. The triangular partitioning mode can be applied to a CU having a size of 8×8 or more. Information indicating whether the triangular partitioning mode is used for the current CU can be signaled at the CU level, for example, as flag information. The triangular partitioning mode can be treated as one mode included in a general merge mode together with a regular merge mode, an MMVD mode, a CIIP mode, and a sub-block based merge mode.
[0164] FIG. 15 illustrates an example in which a triangular partition mode is applied to a current block and the current block is divided into two triangular partitions.
[0165] As shown in FIG. 15, when the triangular partition mode is applied, the current block (CU) can be divided into two triangular partitions by diagonal or anti-diagonal partitioning. Each triangular partition is inter-predicted using its respective motion, and only unidirectional 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 unidirectional prediction is allowed for each partition is that, like normal bidirectional prediction, two motion-compensated prediction blocks are required for each CU.
[0166] Motion information for unidirectional prediction in the triangular partition mode may be derived from the merge candidate list described with reference to FIG. 9. For example, for unidirectional prediction in the triangular partition mode, a uni-prediction candidate list may be derived from the merge candidate list of FIG. 9. When a variable n is an index of a uni-prediction motion candidate included in the uni-prediction candidate list of the triangular partition, the LX motion vector (X is the same as the parity of n) of the nth merge candidate may be used as the nth uni-prediction motion vector of the triangular partition mode. The nth uni-prediction motion vector of the triangular partition mode is represented by "x" in FIG. 15. In this case, if the LX motion vector of the nth merge candidate does not exist, the L(1-X) motion vector of the nth merge candidate may be used as the uni-prediction motion vector of the triangular partition mode instead of the LX motion vector.
[0167] When the triangular partitioning mode is used for the current block, a flag indicating the direction of triangular partitioning (diagonal or anti-diagonal) and two merge indices (one for each partition) may be signaled. The maximum number of TPM merge candidates may be explicitly signaled at the slice level. Also, a syntax binarization method for the TPM merge index may be specified according to the maximum number of TPM merge candidates. After performing prediction for each partition, the predicted sample value may be adjusted along the diagonal or anti-diagonal. The adjustment of the predicted sample value may be performed by a blending process using adaptive weights. The prediction signal generated by the triangular partitioning mode is for the entire CU (current block), and the transformation and quantization process for the residual signal may be performed for the entire CU as in other prediction modes. Finally, the motion field of the CU predicted in the triangular partitioning mode may be stored in 4x4 sample units. The triangular partitioning mode is not performed with a subblock transform (SBT). That is, when the flag indicating the triangular decomposition mode is a first value (e.g., 1), the flag indicating whether or not to perform a subblock-based transform (e.g., cu_sbt_flag) is not signaled and can be inferred to be a second value (e.g., 0).
[0168] After the predictions for each triangular partition are made, a blending process can be performed that is applied to the two prediction signals to derive samples around the diagonal or anti-diagonal edges.
[0169] Overview of IBC (Intra Block Copy) prediction
[0170] The IBC forecast according to this disclosure will be described below.
[0171] IBC prediction may be performed in a prediction unit of an image encoding device / image decoding device. IBC prediction may be simply referred to as "IBC". The IBC may be used for content image / video coding such as games, such as screen content coding (SCC). The IBC may be performed similarly to inter prediction in that it basically performs prediction within a current picture, but derives a reference block within the current picture. That is, the IBC may use at least one of the inter prediction techniques described in this disclosure. For example, the IBC may use at least one of the above-mentioned motion information (motion vector) derivation methods. At least one of the inter prediction techniques may be partially modified in consideration of the IBC prediction. The IBC may refer to a current picture. Thus, it may be referred to as CPR (current picture referencing).
[0172] For IBC, an image coding apparatus may derive an optimal block vector (or motion vector) for a current block (e.g., CU) by performing block matching (BM). The derived block vector may be signaled to an image decoding apparatus via a bitstream using a method similar to the motion information (motion vector) signaling in the above-mentioned inter prediction. The image decoding apparatus may derive a reference block for the current block in the current picture via the signaled block vector, and may thereby derive a prediction signal (predicted block or prediction sample) for the current block. Herein, the block vector may indicate a displacement from the current block to a reference block located in an already restored area in the current picture. Thus, the block vector may also be referred to as a displacement vector. Hereinafter, a motion vector in IBC may correspond to the block vector or the displacement vector. The motion vector of the current block may include a motion vector for a luma component (luma motion vector) or a motion vector for a chroma component (chroma motion vector). For example, the luma motion vector for an IBC coded CU may also be in integer sample units (i.e., integer precision). The chroma motion vector may also be clipped in integer sample units. As described above, IBC may use at least one of the inter prediction techniques, for example, the luma motion vector may be encoded / decoded using the merge mode or MVP mode described above.
[0173] When a merge mode is applied to a luma IBC block, a merge candidate list for the luma IBC block may be configured similarly to a merge candidate list in an inter prediction mode. However, unlike the merge candidate list in an inter prediction mode, the merge candidate list for the luma IBC block may not include a temporal candidate block.
[0174] When the MVP mode is applied to the luma IBC block, the MVP candidate list for the luma IBC block may be configured similarly to the MVP candidate list in the inter prediction mode, except that the merge candidate list for the luma IBC block may not include a temporal candidate block, unlike the MVP candidate list in the inter prediction mode.
[0175] IBC can derive reference blocks from already reconstructed areas in the current picture. In this case, in order to reduce memory consumption and the complexity of the image decoding device, only predefined areas among the already reconstructed areas in the current picture can be referenced. The predefined areas can include the current CTU in which the current block is included. By limiting the referenceable reconstructed areas to the predefined areas in this way, the IBC mode can be implemented in hardware using a local on-chip memory.
[0176] An image coding device that performs IBC can search the already defined region to determine a reference block having the smallest RD cost, and derive a motion vector (block vector) based on the positions of the determined reference block and the current block.
[0177] Prediction mode information for IBC may be signaled at a CU level. For example, flag information indicating whether an IBC skip / merge mode is applied to a current block and / or flag information indicating whether an IBC AMVP mode is applied to a current block may be signaled via a coding_unit syntax.
[0178] In the case of IBC skip / merge mode, a merge candidate index is signaled and can be used to indicate a block vector used for predicting a current luma block among block vectors included in a merge candidate list. In this case, the merge candidate list can include neighboring blocks coded by IBC. As described above, the merge candidate list includes spatial merge candidates, but may not include temporal merge candidates. In addition, the merge candidate list may further include History-based Motion Vector Predictor (HMVP) candidates and / or pairwise candidates.
[0179] In the case of the IBC MVP mode, a block vector difference value may be coded in the same manner as a motion vector difference value in the inter prediction mode. The block vector prediction method in the IBC MVP mode may be performed based on an MVP candidate list including two candidates as predictors, as in the MVP mode. One of the two candidates may be derived from a left peripheral block of the current block, and the other may be derived from an upper peripheral block of the current block. In this case, a candidate may be derived from the left peripheral block or the upper peripheral block only if the left peripheral block or the upper peripheral block is coded in IBC. If the left peripheral block or the upper peripheral block is not available (e.g., not coded in IBC), a predetermined default block vector may 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 that in the MVP mode may be performed in that information (e.g., a flag) for indicating one of the two block vector predictors is signaled as candidate selection information and used for image decoding. The mvp candidate list may include HMVP candidates and / or a zero motion vector as a default block vector.
[0180] The HMVP candidates may also be called history-based MVP candidates, and MVP candidates, merge candidates, or block vector candidates previously used in encoding / decoding of the current block may be stored in the HMVP list as HMVP candidates. Thereafter, if the merge candidate list or MVP candidate list of the current block does not include the maximum number of candidates, the candidates stored in the HMVP list may be added to the merge candidate list or MVP candidate list of the current block as HMVP candidates.
[0181] The pairwise candidate may refer to a candidate derived by averaging two candidates selected according to a predetermined order from among the candidates already included in the merge candidate list of the current block.
[0182] Prediction mode information (e.g., pred_mode_ibc_flag) regarding whether IBC is applied to the current block may be signaled at the CU level. For example, pred_mode_ibc_flag may be signaled via a coding_unit syntax. In this case, pred_mode_ibc_flag having a first value (e.g., 0) may indicate that IBC is not applied to the current block. In contrast, pred_mode_ibc_flag having a second value (e.g., 1) may indicate that IBC is applied to the current block.
[0183] As described above, when an inter prediction mode is applied to a current block, a prediction block of the current block may be generated based on a predetermined merge candidate list. The inter prediction mode for the current block may be determined to be one of various inter prediction modes (e.g., a regular merge mode, an affine mode, a subblock-based merge mode, a triangle partition for inter prediction (TPM), or an intra block copy (IBC), etc.). Information regarding the maximum number of merge candidates included in the merge candidate list may be signaled at a picture level.
[0184] FIG. 16 is a diagram showing an example of a picture parameter set (PPS) including information regarding the maximum number of merging candidates.
[0185] Referring to FIG. 16, a picture parameter set (PPS) may include a syntax element for the maximum number of merging candidates.
[0186] For example, a picture parameter set (PPS) may include pps_six_minus_max_num_merge_cand_plus1. pps_six_minus_max_num_merge_cand_plus1 may indicate whether a syntax element (e.g., pic_six_minus_max_num_merge_cand) used to derive the maximum number of merge candidates is present in a picture header that references the picture parameter set (PPS). For example, pps_six_minus_max_num_merge_cand_plus1 having a first value (e.g., 0) may indicate that pic_six_minus_max_num_merge_cand is present in the picture header. In contrast, pps_six_minus_max_num_merge_cand_plus1 having a value greater than the first value (e.g., 1) may indicate that pic_six_minus_max_num_merge_cand is not present in the picture header. The value of pps_six_minus_max_num_merge_cand_plus1 may be greater than or equal to 0 and less than or equal to 6.
[0187] Furthermore, a picture parameter set (PPS) may include pps_max_num_merge_cand_minus_max_num_triangle_cand_plus1. The pps_max_num_merge_cand_minus_max_num_triangle_cand_plus1 may indicate whether a syntax element (e.g., pic_max_num_merge_cand_minus_max_num_triangle_cand) used to derive the maximum number of TPM merge candidates is present in a picture header of a slice that references the 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 indicate that pic_max_num_merge_cand_minus_max_num_triangle_cand is present in the picture header. Alternatively, pps_max_num_merge_cand_minus_max_num_triangle_cand_plus1 having a value greater than the first value (e.g., 1) may indicate that pic_max_num_merge_cand_minus_max_num_triangle_cand is not present 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 less than or equal to a value obtained by subtracting 1 from pic_max_num_merge_cand_minus_max_num_triangle_cand.
[0188] 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 (e.g., constant_slice_header_params_enabled_flag). For example, when constant_slice_header_params_enabled_flag has a first value (e.g., 0), pps_six_minus_max_num_merge_cand_plus1 and pps_max_num_merge_cand_minus_max_num_triangle_cand_plus1 are not signaled and can be inferred as the first value (e.g., 0). Alternatively, if constant_slice_header_params_enabled_flag has a second value (e.g., 1), pps_six_minus_max_num_merge_cand_plus1 and pps_max_num_merge_cand_minus_max_num_triangle_cand_plus1 may be signaled.
[0189] FIG. 17 is a diagram showing an example of a picture header including information regarding the maximum number of merging candidates.
[0190] Referring to FIG. 17, the picture header may include a syntax element regarding whether TMVP mode is available at the picture level.
[0191] For example, a picture header may include pic_temporal_mvp_enabled_flag. The pic_temporal_mvp_enabled_flag may indicate whether the TMVP mode is available for a current picture that references the picture header. For example, a pic_temporal_mvp_enabled_flag having a first value (e.g., 0) may indicate that the TMVP mode is not available for the current picture. In contrast, a pic_temporal_mvp_enabled_flag having a second value (e.g., 1) may indicate that the TMVP mode is available for the current picture.
[0192] The pic_temporal_mvp_enabled_flag can be signaled only if the TMVP mode is available at the sequence level (e.g., sps_temporal_mvp_enabled_flag==1). If the pic_temporal_mvp_enabled_flag is not signaled, the value of the pic_temporal_mvp_enabled_flag can be inferred to be a first value (e.g., 0). On the other hand, if there is no reference picture in the decoded picture buffer (DPB) that has the same spatial resolution as the current picture, the value of the pic_temporal_mvp_enabled_flag can be limited to a first value (e.g., 0).
[0193] The picture header may also include pic_six_minus_max_num_merge_cand, which may be used to derive a maximum number of regular merge candidates supported in a slice associated with the picture header in regular merge mode. For example, the maximum number of regular 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 regular merge candidates may be greater than or equal to 1 and less than or equal to 6.
[0194] pic_six_minus_max_num_merge_cand may be signaled only if pps_six_minus_max_num_merge_cand_plus1, signaled via a picture parameter set (PPS), has a first value (e.g., 0). If pic_six_minus_max_num_merge_cand is not signaled, the value of pic_six_minus_max_num_merge_cand may be inferred to be the value of pps_six_minus_max_num_merge_cand_plus1 minus 1.
[0195] The picture header may also include pic_five_minus_max_num_subblock_merge_cand, which may be used to derive a maximum number of subblock merging candidates supported in a slice associated with the picture header in a subblock-based merge mode. For example, the maximum number of subblock merging 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 merging candidates may be 0 to 5.
[0196] pic_five_minus_max_num_subblock_merge_cand may be signaled only if affine mode is available at the sequence level (e.g., sps_affine_enabled_flag==1). If 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 to a predetermined value based on a first flag (e.g., sps_sbtmvp_enabled_flag) indicating 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) indicating whether a temporal motion vector predictor (TMVP) mode is available at the picture level. For example, the value of pic_five_minus_max_num_subblock_merge_cand can be inferred to be 5 minus the logical sum (AND) operation result (eg, 1 or 0) of the first flag and the second flag.
[0197] The picture header may also include pic_max_num_merge_cand_minus_max_num_triangle_cand, which may be used in triangulation mode (TPM) to derive a maximum number of TPM merge candidates supported in a slice associated with the picture header. 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 less than or equal to the maximum number of regular merge candidates.
[0198] pic_max_num_merge_cand_minus_max_num_triangle_cand can only be signaled if TPM is available at the sequence level (e.g., sps_triangle_enabled_flag==1), the maximum number of regular merge candidates is 2 or greater (e.g., MaxNumMergeCand≧2), and pps_max_num_merge_cand_minus_max_num_triangle_cand_plus1 signaled via the picture parameter set (PPS) has a first value (e.g., 0).
[0199] If pic_max_num_merge_cand_minus_max_num_triangle_cand is not signaled, and TPM is available at the sequence level (e.g., sps_triangle_enabled_flag==1), and the maximum number of regular merge candidates is two or more (e.g., MaxNumMergeCand≧2), the value of pic_max_num_merge_cand_minus_max_num_triangle_cand can be inferred to be the value of pps_max_num_merge_cand_minus_max_num_triangle_cand_plus1 signaled via the picture parameter set (PPS) minus 1. Alternatively, if pic_max_num_merge_cand_minus_max_num_triangle_cand is not signaled and 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 regular merge candidates may be set to a first value (e.g., 0). In this case, TPM may not be allowed for the slice associated with the picture header.
[0200] The picture header may also include pic_six_minus_max_num_ibc_merge_cand, which may be used to derive a maximum number of IBC merge candidates supported in an intra block copy (IBC) slice associated with the picture header. 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 1 to 6.
[0201] According to the above-described examples with reference to Figures 16 and 17, in various inter prediction modes such as a normal merge mode and a sub-block based merge mode, information on the maximum number of merge candidates may be signaled via a picture parameter set (PPS) and / or a picture header. However, in an actual system implementation environment, there are not many use cases in which the number of merge candidates differs for each picture. Therefore, when information on the maximum number of merge candidates is signaled via a picture parameter set (PPS) and / or a picture header, signaling overhead may be unnecessarily increased.
[0202] Also, information regarding the maximum number of merging candidates may be signaled via a picture parameter set (PPS) and / or a picture header based on predetermined information signaled at the sequence level (e.g., sps_affine_enabled_flag, sps_sbtmvp_enabled_flag, etc.). That is, the maximum number of merging candidates may be determined based on multiple pieces of information signaled sporadically at the sequence level and the picture level, which may result in complex tool control for various inter prediction modes.
[0203] To solve these problems, according to an embodiment of the present disclosure, information regarding the maximum number of merging candidates can be jointly signaled at the sequence level, e.g., via a sequence parameter set (SPS), which can reduce signaling overhead and make tool control over various inter prediction modes easier.
[0204] Hereinafter, embodiments of the present disclosure will be described in detail with reference to the accompanying drawings.
[0205] First Example
[0206] According to a first embodiment, in various inter prediction modes, information regarding the maximum number of merging candidates can be jointly defined in a syntax at a level higher than the picture level, for example, in a sequence parameter set (SPS).
[0207] FIG. 18 is a diagram illustrating an example of a picture parameter set (PPS) according to an embodiment of the present disclosure.
[0208] 18, the picture parameter set (PPS) may not include information regarding the maximum number of merge candidates, unlike the picture parameter set (PPS) described above with reference to FIG 16. For example, the picture parameter set (PPS) may not include syntax elements pps_six_minus_max_num_merge_cand_plus1 related to the maximum number of regular merge candidates and pps_max_num_merge_cand_minus_max_num_triangle_cand_plus1 related to the maximum number of TPM merge candidates. This allows tool control of the regular merge mode and the TPM to be performed independently of the picture parameter set (PPS).
[0209] FIG. 19 is a diagram illustrating an example of a sequence parameter set (SPS) according to an embodiment of the present disclosure.
[0210] Referring to FIG. 19, a sequence parameter set (SPS) may include information regarding the maximum number of merging candidates.
[0211] For example, the sequence parameter set (SPS) may include sps_six_minus_max_num_merge_cand, which may be used to derive the maximum number of regular merge candidates in a regular merge mode. For example, the maximum number of regular merge candidates may be derived based on sps_six_minus_max_num_merge_cand as shown in Equation 3 below.
[0212] [Formula 3] MaxNumMergeCand=6-sps_six_minus_max_num_merge_cand
[0213] Here, MaxNumMergeCand may refer to the maximum number of regular merge candidates. In one example, the value of MaxNumMergeCand may be 1 to 6.
[0214] Furthermore, 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 a subblock-based merge 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.
[0215] [Formula 4] MaxNumSubblockMergeCand=5-sps_five_minus_max_num_subblock_merge_cand
[0216] Here, MaxNumSubblockMergeCand may represent the maximum number of subblock merging candidates. In one example, the value of MaxNumSubblockMergeCand may be 0 to 5.
[0217] sps_five_minus_max_num_subblock_merge_cand may be signaled only if affine mode is available at the sequence level (e.g., sps_affine_enabled_flag==1). If 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 to a predetermined value based on a first flag (e.g., sps_sbtmvp_enabled_flag) indicating whether subblock-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 to be a value obtained by subtracting the value of the first flag from 5.
[0218] 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 triangulation 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.
[0219] [Formula 5] MaxNumTriangleMergeCand =MaxNumMergeCand-sps_max_num_merge_cand_minus_max_num_triangle_cand
[0220] Here, MaxNumTriangleMergeCand may mean the maximum number of TPM merge candidates, and MaxNumMergeCand may mean the maximum number of regular merge candidates. In one example, the value of MaxNumTriangleMergeCand may be greater than or equal to 2 and less than or equal to the maximum number of regular merge candidates (e.g., MaxNumMergeCand).
[0221] sps_max_num_merge_cand_minus_max_num_triangle_cand may be signaled only if a TPM is available at the sequence level (e.g., sps_triangle_enabled_flag==1) and the maximum number of regular merge candidates is 2 or greater (e.g., MaxNumMergeCand≧2). If sps_max_num_merge_cand_minus_max_num_triangle_cand is not signaled, if a TPM is not available at the sequence level (e.g., sps_triangle_enabled_flag==0) or if 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.
[0222] Furthermore, 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 in 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.
[0223] [Formula 6] MaxNumIbcMergeCand=6-sps_six_minus_max_num_ibc_merge_cand
[0224] Here, MaxNumIbcMergeCand may mean the maximum number of IBC merge candidates. In one example, the value of MaxNumIbcMergeCand may be 1 to 6.
[0225] Because the sequence parameter set (SPS) includes information regarding the maximum number of merge candidates, a picture header that references the sequence parameter set (SPS) may not include syntax elements regarding whether TMVP mode is available at the picture level (e.g., pic_temporal_mvp_enabled_flag) and 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), unlike the picture header described above with reference to FIG. 17.
[0226] According to the first embodiment described above with reference to FIG. 18 and FIG. 19, in various inter prediction modes, information on the maximum number of merge candidates may be integrally defined in a syntax higher than the picture level, for example, in a sequence parameter set (SPS). This can reduce signaling overhead compared to a case where information on the maximum number of merge candidates is signaled via a picture parameter set (PPS) and / or a picture header. In addition, information on the maximum number of merge candidates may be signaled based on the same higher level syntax, for example, predetermined information (e.g., sps_affine_enabled_flag, sps_sbtmvp_enabled_flag, etc.) in the sequence parameter set (SPS). This can facilitate tool control for various inter prediction modes such as a regular merge mode and a sub-block based merge mode.
[0227] Meanwhile, in one example, the pic_temporal_mvp_enabled_flag, a syntax element indicating whether TMVP mode is available at the picture level, is excluded from the picture header, so that some of the signaling conditions in the slice header can be modified as shown in FIG. 20.
[0228] FIG. 20 is a diagram illustrating an example of a slice header according to an embodiment of the present disclosure.
[0229] Referring to Figure 20, identification information of a co-located picture (colPic) (e.g., collocated_from_l0_flag and collocated_ref_idx) can be signaled based on whether TMVP mode is available at the sequence level (e.g., sps_temporal_mvp_enabled_flag), regardless of whether TMVP mode is available at the picture level.
[0230] Second Example
[0231] According to the second embodiment, information regarding the maximum number of merge candidates (e.g., sps_six_minus_max_num_merge_cand, sps_five_minus_max_num_subblock_merge_cand, etc.) can be integrally defined in a syntax at a higher level than the picture level, for example, in a sequence parameter set (SPS), as in the first embodiment. Specifically, the picture parameter set (PPS) described above with reference to FIG. 18 and the sequence parameter set (SPS) described above with reference to FIG. 19 can also be applied to the second embodiment. However, in the second embodiment, the semantics of some syntax elements and the picture header structure may differ from those of the first embodiment. Below, the second embodiment will be described in detail, focusing on the differences from the first embodiment.
[0232] FIG. 21 is a diagram illustrating an example of a picture header according to an embodiment of the present disclosure.
[0233] 21, a picture header according to an embodiment of the present disclosure may not include a syntax element related to the maximum number of merge candidates. Specifically, since a sequence parameter set (SPS) includes a syntax element related to the maximum number of merge candidates, a picture header that references the sequence parameter set (SPS) may not include a syntax element related to 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), unlike the picture header described above with reference to FIG. 17.
[0234] However, the picture header may include a syntax element pic_temporal_mvp_enabled_flag regarding whether the TMVP mode is available at the picture level. In this respect, the second embodiment may differ from the first embodiment.
[0235] The pic_temporal_mvp_enabled_flag may indicate 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 indicate that the TMVP mode is not available for the current picture. In contrast, a pic_temporal_mvp_enabled_flag having a second value (e.g., 1) may indicate that the TMVP mode is available for the current picture that references the picture header.
[0236] The pic_temporal_mvp_enabled_flag can be signaled only if the TMVP mode is available at the sequence level (e.g., sps_temporal_mvp_enabled_flag==1). If the pic_temporal_mvp_enabled_flag is not signaled, the value of the pic_temporal_mvp_enabled_flag can be inferred to be a first value (e.g., 0). On the other hand, if there is no reference picture in the decoded picture buffer (DPB) that has the same spatial resolution as the current picture, the value of the pic_temporal_mvp_enabled_flag can be limited to a first value (e.g., 0).
[0237] Because the picture header includes pic_temporal_mvp_enabled_flag, the semantics of sps_five_minus_max_num_subblock_merge_cand, a syntax element related to the subblock-based merge mode in the sequence parameter set (SPS) described above with reference to FIG. 19, can be partially modified as follows:
[0238] If 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 can be inferred to be a predefined value (eg, 5).
[0239] In one example, if sps_five_minus_max_num_subblock_merge_cand is inferred to be a predetermined value (e.g., 5), a variable IsInfered may be set to true. Then, the maximum number of subblock merging candidates derived based on Equation 4 may be updated based on pic_temporal_mvp_enabled_flag and IsInfered as shown in Equation 7 below.
[0240] [Formula 7] MaxNumSubblockMergeCand=(IsInfered&&(sps_sbtmvp_enabled_flag&&pic_temporal_mvp_enabled_flag))?1:MaxNumSubblockMergeCand
[0241] Here, MaxNumSubblockMergeCand may represent the maximum number of subblock merging candidates. In one example, the value of MaxNumSubblockMergeCand may be 0 to 5.
[0242] Referring to Equation 7, if IsInfered is true and a logical 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). In contrast, if at least one of IsInfered and a logical AND operation result of sps_sbtmvp_enabled_flag and pic_temporal_mvp_enabled_flag is false, the value of MaxNumSubblockMergeCand may not be updated. Meanwhile, Equation 7 may be defined in the picture header as the semantics of pic_temporal_mvp_enabled_flag, or may be defined in the sequence parameter set (SPS) as the semantics of sps_five_minus_max_num_subblock_merge_cand.
[0243] In another example, if sps_five_minus_max_num_subblock_merge_cand is inferred to be a predetermined value (e.g., 5), a variable IsInfered may be set to true. And, the maximum number of subblock merging 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-mentioned Equation 4 may be replaced with Equation 8.
[0244] [Formula 8] MaxNumSubblockMergeCand=5-sps_five_minus_max_num_subblock_merge_cand+(IsInfered&&(sps_sbtmvp_enabled_flag&&pic_temporal_mvp_enabled_flag))?1:0
[0245] Here, MaxNumSubblockMergeCand may represent the maximum number of subblock merging candidates. In one example, the value of MaxNumSubblockMergeCand may be 0 to 5.
[0246] Referring to Equation 8, when IsInfered is true and a logical AND operation result of sps_sbtmvp_enabled_flag and pic_temporal_mvp_enabled_flag is true, the value of MaxNumSubblockMergeCand can be derived by subtracting the value of sps_five_minus_max_num_subblock_merge_cand from 5 and adding 1. In contrast, when at least one of IsInfered and the logical AND operation result 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. Meanwhile, Equation 8 may be defined in the picture header as the semantics of pic_temporal_mvp_enabled_flag, or may be defined in the sequence parameter set (SPS) as the semantics of sps_five_minus_max_num_subblock_merge_cand.
[0247] In another example, the criterion value used in deriving the maximum number of subblock merging candidates may be changed from 5 to 4. Accordingly, the name of sps_five_minus_max_num_subblock_merge_cand may also be changed to sps_four_minus_max_num_subblock_merge_cand.
[0248] If sps_four_minus_max_num_subblock_merge_cand is not signaled (e.g., sps_affine_enabled_flag==0), the value of sps_four_minus_max_num_subblock_merge_cand can be inferred to be a predetermined value (e.g., 4) regardless of whether the subblock-based TMV mode is available at the sequence level. And, the above-mentioned Equations 4 and 7 can be replaced by the following Equations 9 and 10, respectively.
[0249] [Formula 9] MaxNumSubblockMergeCand=4-sps_four_minus_max_num_subblock_merge_cand
[0250] [Formula 10] MaxNumSubblockMergeCand+=(sps_sbtmvp_enabled_flag&&pic_temporal_mvp_enabled_flag))?1:0
[0251] Here, MaxNumSubblockMergeCand may represent the maximum number of subblock merging candidates.
[0252] Referring to Equation 9 and Equation 10 together, the value of MaxNumSubblockMergeCand can be derived by subtracting the value of sps_four_minus_max_num_subblock_merge_cand from 4. The value of MaxNumSubblockMergeCand can be updated based on the result of a logical AND operation of sps_sbtmvp_enabled_flag and pic_temporal_mvp_enabled_flag. For example, if the result of a logical AND operation of sps_sbtmvp_enabled_flag and pic_temporal_mvp_enabled_flag is true, the value of MaxNumSubblockMergeCand can be increased by 1. On the other hand, if the result of a logical AND operation of sps_sbtmvp_enabled_flag and pic_temporal_mvp_enabled_flag is false, the value of MaxNumSubblockMergeCand can not be updated. Meanwhile, Equation 10 may be defined in the picture header as the semantics of pic_temporal_mvp_enabled_flag, or may be defined in the sequence parameter set (SPS) as the semantics of sps_four_minus_max_num_subblock_merge_cand.
[0253] According to the second embodiment described above with reference to FIG. 21, in various inter prediction modes, information on the maximum number of merge candidates may be integrally defined in a syntax higher than the picture level, for example, in a sequence parameter set (SPS). This can reduce signaling overhead compared to when information on the maximum number of merge candidates is signaled via a picture parameter set (PPS) and / or a picture header. In addition, information on the maximum number of merge candidates may be signaled based on the same higher level syntax, for example, predetermined information (e.g., sps_affine_enabled_flag, sps_sbtmvp_enabled_flag, etc.) in the sequence parameter set (SPS). This can facilitate tool control for various inter prediction modes, such as a regular merge mode and a sub-block based merge mode.
[0254] Hereinafter, an image encoding / decoding method according to an embodiment of the present disclosure will be described in detail with reference to FIGS.
[0255] FIG. 22 is a flowchart illustrating an image encoding method according to one embodiment of the present disclosure.
[0256] The image encoding method of Fig. 22 may be performed by the image encoding apparatus of Fig. 2. For example, steps S2210 and S2220 may be performed by the inter prediction unit 180. Also, step S2230 may be performed by the entropy encoding unit 190.
[0257] Referring to FIG. 22, when an inter prediction mode is applied to a current block, the image encoding apparatus may configure a merge candidate list for the current block based on the prediction mode of the current block (S2210).
[0258] Specifically, the prediction mode of the current block can be determined to be any one of various inter prediction modes (e.g., regular merge mode, subblock-based merge mode, triangle partition for inter prediction (TPM), or intra block copy (IBC), etc.).
[0259] The image encoding apparatus may derive merge candidates based on a prediction mode of a current block, and may construct a merge candidate list using the induced merge candidates. Here, the merge candidates may be derived from neighboring blocks of the current block, for example, spatial neighboring blocks and / or temporal neighboring blocks. The merge candidates may be variously called regular merge candidates, sub-block merge candidates, TPM merge candidates, etc., depending on the prediction mode of the current block.
[0260] The image encoding apparatus 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 at least one of, for example, history based merge candidate(s), pair-wise average merge candidate(s), ATMVP, combined bi-predictive merge candidate (when the slice / tile group type of the current slice / tile group is type B), and / or zero vector merge candidate. Then, when the number of merge candidates included in the merge candidate list becomes equal to or greater than the predetermined maximum number, the image encoding apparatus may end the construction of the merge candidate list.
[0261] 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 among the merge candidates included in the merge candidate list based on an RD cost, and derive motion information of the selected merge candidate as motion information of the current block. In this case, the image encoding device may generate a predicted block of the current block by performing inter prediction based on the derived motion information.
[0262] The image encoding apparatus may encode motion information of a current block and information on the maximum number of merging candidates (S2230). Here, the motion information of the current block may include candidate selection information (e.g., a merge index) indicating the selected merging candidate. In addition, the information on the maximum number of merging candidates may include information for each inter prediction mode and may be used to derive the maximum number of merging candidates.
[0263] According to an embodiment of the present disclosure, the information on the maximum number of merge candidates may be integrally coded in a syntax higher than the picture level, for example, in a sequence parameter set (SPS). For example, the sequence parameter set (SPS) may include sps_six_minus_max_num_merge_cand, which is information on the maximum number of merge candidates for a normal merge mode. Also, the sequence parameter set (SPS) may include sps_five_minus_max_num_subblock_merge_cand, which is information on the maximum number of merge candidates for a subblock-based merge mode. Also, the sequence parameter set (SPS) may include sps_max_num_merge_cand_minus_max_num_triangle_cand, which is information on the maximum number of merge candidates for a triangulation partitioning mode (TPM). Also, the sequence parameter set (SPS) may include sps_six_minus_max_num_ibc_merge_cand, which is information on the maximum number of merge candidates for IBC. An example of the sequence parameter set (SPS) has been described above with reference to FIG. 19. Meanwhile, in Fig. 19, the maximum number information of merge candidates is included only in the sequence parameter set, but this can be modified in various ways depending on the embodiment. For example, some of the above-mentioned 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.
[0264] Meanwhile, in the subblock-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 to be a value obtained by subtracting the value of the above-mentioned sps_five_minus_max_num_subblock_merge_cand from 5. In contrast, 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 subblock-based TMVP (subblock-based temporal morion vector predictor) mode is available for the current block (e.g., sps__sbtmvp_enabled_flag) and whether the TMVP (temporal motion vector predictor) mode is available for the current block (e.g., pic_temporal_mvp_enabled_flag). For example, if at least one of the sub-block-based TMVP mode and the TMVP mode is not available, the maximum number of merging candidates may be determined to be a first value (e.g., 0). In contrast, if both the sub-block-based TMVP mode and the TMVP mode are available, the maximum number of merging candidates may be determined to be a second value (e.g., 1). In this manner, in the sub-block-based merging mode, information on the maximum number of merging candidates is signaled at the sequence level, but the maximum number of merging candidates may be determined at the picture level by taking into account whether the TMVP mode is available at the picture level.
[0265] As described above, according to one embodiment of the present disclosure, information on the maximum number of merging candidates is jointly coded in a syntax at a level higher than the picture level, for example, in a sequence parameter set (SPS), thereby further reducing signaling overhead.
[0266] FIG. 23 is a flowchart illustrating an image decoding method according to one embodiment of the present disclosure.
[0267] The image decoding method of Fig. 23 may be performed by the image decoding apparatus of Fig. 3. For example, steps S2310 to S2330 may be performed by the inter prediction unit 260.
[0268] Referring to FIG. 23, when an inter prediction mode is applied to a current block, the image decoding apparatus may configure a merge candidate list for the current block based on the prediction mode of the current block (S2310).
[0269] Specifically, the image decoding apparatus may derive merging candidates based on a prediction mode of a current block, and may construct a merging candidate list using the induced merging candidates. Here, the merging candidates may be derived from neighboring blocks of the current block, for example, spatial neighboring blocks and / or temporal neighboring blocks. Then, when the number of merging candidates included in the merging candidate list is equal to or greater than a predetermined maximum number, the image decoding apparatus may terminate construction of the merging candidate list.
[0270] According to an embodiment of the present disclosure, the maximum number of merge candidates may be determined based on information on the maximum number of merge candidates acquired through a syntax at a level higher than the picture level, for example, a sequence parameter set (SPS). For example, the sequence parameter set (SPS) may include sps_six_minus_max_num_merge_cand, which is information on the maximum number of merge candidates for a regular merge mode. In addition, the sequence parameter set (SPS) may include sps_five_minus_max_num_subblock_merge_cand, which is information on the maximum number of merge candidates for a subblock-based merge mode. In addition, the sequence parameter set (SPS) may include sps_max_num_merge_cand_minus_max_num_triangle_cand, which is information on the maximum number of merge candidates for a triangulation partitioning mode (TPM). In addition, the sequence parameter set (SPS) may include sps_six_minus_max_num_ibc_merge_cand, which is information on the maximum number of merge candidates for IBC. An example of the sequence parameter set (SPS) is as described above with reference to Fig. 19. Meanwhile, Fig. 19 shows a case where the maximum number information of merge candidates is included only in the sequence parameter set, but this can be modified in various ways depending on the embodiment. For example, some of the above-mentioned 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.
[0271] Meanwhile, in the subblock-based merge mode, the maximum number of merge candidates may be determined based on whether an 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 based on information on the maximum number of merge candidates (e.g., sps_five_minus_max_num_subblock_merge_cand) obtained through a sequence parameter set. For example, the maximum number of merge candidates may be determined to be a value obtained by subtracting the value of sps_five_minus_max_num_subblock_merge_cand from 5. In contrast, 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 a subblock-based temporal motion vector predictor (TMVP) mode is available for the current block and whether a temporal motion vector predictor (TMVP) mode is available for the current block. For example, if at least one of the sub-block-based TMVP mode and the TMVP mode is not available, the maximum number of merging candidates may be determined to be a first value (e.g., 0). Conversely, if the sub-block-based TMVP mode and the TMVP mode are both available, the maximum number of merging candidates may be determined to be a second value (e.g., 1).
[0272] Whether or not 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 via a sequence parameter set. For example, if sps_sbtmvp_enabled_flag has a first value (e.g., 0), the sub-block-based TMVP mode is not available. In contrast, if sps_sbtmvp_enabled_flag has a second value (e.g., 1), the sub-block-based TMVP mode is available. Whether or not 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 via a picture header. For example, if pic_temporal_mvp_enabled_flag has a first value (e.g., 0), the TMVP mode is not available. In contrast, if pic_temporal_mvp_enabled_flag has a value (e.g., 1), the TMVP mode is available. In this way, in sub-block-based merging mode, information about the maximum number of merging candidates is signaled at the sequence level, but the maximum number of merging candidates can be determined at the picture level by taking into account whether TMVP mode is available at the picture level.
[0273] In one example, when affine mode is available in sub-block based merging mode, the maximum number of merging candidates may have a predetermined range based on whether sub-block based TMVP mode is available.
[0274] Specifically, sps_five_minus_max_num_subblock_merge_cand may range from 0 to "5-sps_sbtmvp_enabled_flag". Thus, if subblock-based TMVP mode is available (e.g., sps_sbtmvp_enabled_flag==1), sps_five_minus_max_num_subblock_merge_cand may range from 0 to 4. In contrast, if subblock-based TMVP mode is not available (e.g., sps_sbtmvp_enabled_flag==0), sps_five_minus_max_num_subblock_merge_cand may range from 0 to 5. On the other hand, if 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, if affine mode is available in the sub-block-based merge mode (e.g., sps_affine_enabled_flag==1) and sub-block-based TMVP mode is available (e.g., sps_sbtmvp_enabled_flag==1), the maximum number of merge candidates may range from 1 to 5. Conversely, if affine mode is available in the sub-block-based merge mode (e.g., sps_affine_enabled_flag==1) and sub-block-based TMVP mode is not available (e.g., sps_sbtmvp_enabled_flag==0), the maximum number of merge candidates may range from 0 to 5.
[0275] 23, the image decoding apparatus may derive motion information of the current block based on the constructed merging candidate list (S2320). Specifically, the image decoding apparatus may select at least one merging candidate from among the merging candidates included in the merging candidate list based on candidate selection information (e.g., a merging index) acquired from a bitstream. Then, the image decoding apparatus may derive motion information of the selected merging candidate as motion information of the current block.
[0276] The image decoding apparatus may generate a prediction block of the current block by performing inter prediction based on the derived motion information (S2330). As described above, the current block may be reconstructed based on the generated prediction block.
[0277] As described above, according to one embodiment of the present disclosure, various information for determining the maximum number of merging candidates is integrated into a syntax at a level higher than the picture level, such as a sequence parameter set (SPS), making tool control for various inter prediction modes easier.
[0278] The names of syntax elements described in this disclosure may include information regarding the location where the syntax element is signaled. For example, a syntax element beginning with "sps_" may mean that the syntax element is signaled in a sequence parameter set (SPS). Furthermore, a syntax element beginning with "pps_", "ph_", "sh_", etc. may mean that the syntax element is signaled in a picture parameter set (PPS), a picture header, a slice header, etc., respectively.
[0279] Although the exemplary method of the present disclosure is expressed as a series of operations for clarity of explanation, this is not intended to limit the order in which the steps are performed, and each step may be performed simultaneously or in a different order, if necessary. To realize the method according to the present disclosure, the steps illustrated may include other steps, some steps may be omitted and the remaining steps may be omitted, or some steps may be omitted and additional steps may be included.
[0280] In the present disclosure, an image encoding device or an image decoding device that performs a predetermined operation (step) can perform the operation (step) to check the execution conditions or circumstances of the operation (step). For example, if it is described that a predetermined operation is performed when a predetermined condition is satisfied, the image encoding device or the image decoding device can perform the predetermined operation after performing an operation to check whether the predetermined condition is satisfied or not.
[0281] The various embodiments of the present disclosure are not intended to enumerate all possible combinations, but are intended to describe representative aspects of the present disclosure, and the matters described in the various embodiments may be applied independently or in combination of two or more.
[0282] Additionally, various embodiments of the present disclosure may be implemented using hardware, firmware, software, or a combination thereof, etc. In the case of a hardware implementation, the implementation may be implemented using one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), general processors, controllers, microcontrollers, microprocessors, etc.
[0283] 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 transmitting / receiving device, a mobile communication terminal, a home cinema video device, a digital cinema video device, a surveillance camera, a video conversation device, a real-time communication device such as a video communication, a mobile streaming device, a storage medium, a camcorder, a custom video (VoD) service providing device, an over-the-top video (OTT) device, an internet streaming service providing device, a three-dimensional (3D) video device, an image telephone video device, and a medical video device, and may be used to process a video signal or a data signal. For example, the over-the-top video (OTT) device may include a game console, a Blu-ray player, an internet-connected TV, a home theater system, a smartphone, a tablet PC, a digital video recorder (DVR), and the like.
[0284] FIG. 24 is a diagram illustrating a content streaming system to which an embodiment of the present disclosure can be applied.
[0285] As shown in FIG. 24, a content streaming system to which an embodiment of the present disclosure is applied may broadly include an encoding server, a streaming server, a Web server, a media storage, a user device, and a multimedia input device.
[0286] The encoding server compresses content input from a multimedia input device such as a smartphone, camera, camcorder, etc. into digital data to generate a bitstream and transmits the bitstream to the streaming server. As another example, if a multimedia input device such as a smartphone, camera, video camera, etc. directly generates a bitstream, the encoding server can be omitted.
[0287] The bitstream may be generated by an image encoding method and / or image encoding device to which an embodiment of the present disclosure is applied, and the streaming server may temporarily store the bitstream in the process of transmitting or receiving the bitstream.
[0288] The streaming server transmits multimedia data to a user device based on a user request via a web server, and the web server can act as a medium to inform the user of available services. When a user requests a desired service from the web server, the web server transmits the request to the streaming server, and the streaming server can transmit the multimedia data to the user. At this time, the content streaming system can include a separate control server, and in this case, the control server can control commands / responses between devices in the content streaming system.
[0289] The streaming server may receive the content from a media storage and / or an encoding server. For example, when receiving the content from the encoding server, the content may be received in real time. In this case, the streaming server may store the bitstream for a certain period of time in order to provide a smooth streaming service.
[0290] Examples of the user devices include mobile phones, smart phones, laptop computers, digital broadcasting terminals, personal digital assistants (PDAs), portable multimedia players (PMPs), navigation systems, slate PCs, tablet PCs, ultrabooks, wearable devices such as smartwatches, smart glass, head mounted displays (HMDs), digital TVs, desktop computers, and digital signage.
[0291] Each server in the content streaming system can be operated as a distributed server, in which case data received from each server can be processed in a distributed manner.
[0292] The scope of the present disclosure includes software or machine-executable commands (e.g., operating systems, applications, firmware, programs, etc.) that cause operations according to the methods of the various embodiments to be performed on a device or computer, and non-transitory computer-readable medium on which such software or commands can be stored and executed on a device or computer. [Industrial Applicability]
[0293] The embodiments of the present disclosure can be used to encode / decode images.
Claims
1. An image decoding method performed by an image decoding device, comprising: The image decoding method includes: constructing a candidate list for a current block based on a prediction mode of the current block; deriving motion information of the current block based on the candidate list; generating a prediction block of the current block based on the motion information; Information regarding the maximum number of candidates to be included in the candidate list is obtained via a sequence parameter set; The information regarding the maximum number of candidates may be Information about the maximum number of subblock merging candidates; Information about the maximum number of merge candidates, Information regarding the maximum number of intra block copy (IBC) candidates; and information regarding a maximum number of first mode candidates; Based on the prediction mode being a sub-block based merging mode, the maximum number of sub-block merging candidates is determined based on whether an affine mode is available for the current block.
2. 2. The image decoding method of claim 1, wherein the maximum number of sub-block merging candidates is determined based on the information regarding the maximum number of sub-block merging candidates, based on the prediction mode being the sub-block based merging mode and the affine mode being available.
3. 2. The image decoding method of claim 1, wherein, based on the prediction mode being the sub-block based merging mode and the affine mode not being available, the maximum number of sub-block merging candidates is determined based on whether a sub-block based temporal motion vector predictor (TMVP) mode is available for the current block and whether a TMVP mode is available for the current block.
4. Whether the sub-block based TMVP mode is available is determined based on a first flag obtained via the sequence parameter set; The image decoding method according to claim 3 , wherein whether the TMVP mode is available is determined based on a second flag obtained via a picture header.
5. The image decoding method of claim 3 , further comprising determining, based on at least one of the sub-block-based TMVP mode or the TMVP mode being unavailable, that the maximum number of sub-block merging candidates is a first value.
6. The image decoding method according to claim 3 , wherein the maximum number of sub-block merging candidates is determined to be a second value based on availability of both the sub-block-based TMVP mode and the TMVP mode.
7. 2. The image decoding method of claim 1, wherein the prediction mode is the sub-block based merging mode and the affine mode is available, and the maximum number of sub-block merging candidates has a predetermined range based on whether a sub-block based TMVP mode is available for the current block.
8. The image decoding method according to claim 7 , wherein the maximum number of sub-block merging candidates ranges from 1 to 5, based on availability of the sub-block-based TMVP mode.
9. The image decoding method of claim 7 , wherein the maximum number of sub-block merging candidates ranges from 0 to 5, based on the sub-block-based TMVP mode being unavailable.
10. An image coding method performed by an image coding device, comprising: The image encoding method includes: constructing a candidate list for a current block based on a prediction mode of the current block; deriving motion information of the current block based on the candidate list; encoding said motion information and information regarding a maximum number of candidates to be included in said candidate list; the information regarding the maximum number of candidates to be included in the candidate list is encoded via a sequence parameter set; The information regarding the maximum number of candidates may be Information about the maximum number of subblock merging candidates; Information about the maximum number of merge candidates, Information regarding the maximum number of intra block copy (IBC) candidates; and information regarding a maximum number of first mode candidates; The method of claim 1, wherein the prediction mode is a sub-block based merging mode, and the maximum number of sub-block merging candidates is determined based on whether an affine mode is available for the current block.
11. 11. The image encoding method of claim 10, wherein, based on the prediction mode being the sub-block based merging mode and the affine mode not being available, the maximum number of sub-block merging candidates is determined based on whether a sub-block based temporal motion vector predictor (TMVP) mode is available for the current block and whether a TMVP mode is available for the current block.
12. The image coding method of claim 11 , wherein the maximum number of sub-block merging candidates is determined to be a first value based on at least one of the sub-block-based TMVP mode or the TMVP mode being unavailable.
13. The image coding method according to claim 11 , wherein the maximum number of sub-block merging candidates is determined to be a second value based on availability of both the sub-block-based TMVP mode and the TMVP mode.
14. A method for transmitting a bitstream generated by an image coding method, comprising the steps of: The image encoding method includes: constructing a candidate list for a current block based on a prediction mode of the current block; deriving motion information of the current block based on the candidate list; encoding said motion information and information regarding a maximum number of candidates to be included in said candidate list; the information regarding the maximum number of candidates to be included in the candidate list is encoded via a sequence parameter set; The information regarding the maximum number of candidates may be Information about the maximum number of subblock merging candidates; Information about the maximum number of merge candidates, Information regarding the maximum number of intra block copy (IBC) candidates; and information regarding a maximum number of first mode candidates; The method of claim 1, wherein based on the prediction mode being a sub-block based merging mode, the maximum number of sub-block merging candidates is determined based on whether an affine mode is available for the current block.
Citation Information
Patent Citations
Video encoding / decoding method and apparatus
EP3062518A1
Image encoder, image encoding method and image encoding program, and image decoder, image decoding method and image decoding program
JP2018056685A
Indication of co-located pictures in a video bitstream
JP2023513343A
Method for decoding video signal and apparatus therefor
US20190313112A1
Method and apparatus for processing video signal
US20210211646A1
